A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Setting Up & Running Reports
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Printing to default and pdf printer simultaneously



 
 
Thread Tools Display Modes
  #1  
Old August 3rd, 2007, 09:37 AM posted to microsoft.public.access.reports
davea
external usenet poster
 
Posts: 18
Default Printing to default and pdf printer simultaneously

I am trying to print a report to the default printer on a client PC
and at the same time print the report to a pdf printer and save a copy
of it. My code so far is:

Dim dbs As Database, rst As Recordset
Set dbs = CurrentDb()
Set rst = dbs.OpenRecordset("tblPrintedReports")
If intPreview = 0 Then
MsgBox "HP13 Letter Printing"
' Place code here to update a table field to show it was sent to
printer
rst.AddNew
rst!ReportName = "rptHP13"
rst!PrintDate = Now
rst!ApplicationNumber = [Reports]![rptHP13].[ApplicationNumber]
rst.Update
[Forms]![frmHL1Main]![subform]![tblPrintedReports].Requery

End If

This prompts the user to select a printer. I have no idea how to set
the report to print to the default and then to a named pdf printer
without prompting the user to select. Any help would be appreciated.

  #2  
Old August 4th, 2007, 02:04 AM posted to microsoft.public.access.reports
JC
external usenet poster
 
Posts: 243
Default Printing to default and pdf printer simultaneously

I copied the report, set the default printer in page setup to a specific
printer(pdf), used a macro to print the pdf copy directly after the original.

"davea" wrote:

I am trying to print a report to the default printer on a client PC
and at the same time print the report to a pdf printer and save a copy
of it. My code so far is:

Dim dbs As Database, rst As Recordset
Set dbs = CurrentDb()
Set rst = dbs.OpenRecordset("tblPrintedReports")
If intPreview = 0 Then
MsgBox "HP13 Letter Printing"
' Place code here to update a table field to show it was sent to
printer
rst.AddNew
rst!ReportName = "rptHP13"
rst!PrintDate = Now
rst!ApplicationNumber = [Reports]![rptHP13].[ApplicationNumber]
rst.Update
[Forms]![frmHL1Main]![subform]![tblPrintedReports].Requery

End If

This prompts the user to select a printer. I have no idea how to set
the report to print to the default and then to a named pdf printer
without prompting the user to select. Any help would be appreciated.


 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 08:02 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.