WUGNET, the Windows User Group Network
Your Complete Resource Center for "The Best" in Shareware, Computing Tips and Support, Windows Industry News... and much more!
Home Forums Shareware Windows Tips Hot Offers FREE Newsletters Arcade Contact Us About Partners
Search WUGNET: RSS Feeds RSS Feeds Advertise with WUGNET    |    Shareware eBooks
HomeHome FAQFAQ      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

Printer Choice

 
   Home -> Office other -> General Discussions RSS
Next:  Are there such things as RTF codes or Tags?  
Author Message
dave

External


Since: May 30, 2008
Posts: 5



(Msg. 1) Posted: Sun Jul 20, 2008 6:40 pm
Post subject: Printer Choice
Archived from groups: microsoft>public>access (more info?)

Access 2007

I want to have a macro that prints a form to .pdf.

However the .pdf printer is not the default printer.

Is there anyway to code changing printers?

Thanks

dave
Back to top
Login to vote
Allen Browne

External


Since: Nov 08, 2003
Posts: 3408



(Msg. 2) Posted: Mon Jul 21, 2008 3:00 am
Post subject: Re: Printer Choice [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

"dave" <dave.DeleteThis@accessdatapros.com> wrote in message
news:2E110ACD-554E-436A-ABBF-7D64456FE626@microsoft.com...
> Access 2007
> I want to have a macro that prints a form to .pdf.
> However the .pdf printer is not the default printer.
> Is there anyway to code changing printers?

This example assumes:
- You have the PDF add-in installed. If not, see
http://www.microsoft.com/downloads/details.aspx?familyid=4D951911-3E7E...E6-B059
- You want to save the PDF to your desktop.
- In older versions of Access, the code needs to just show a preview.
- You need to apply a filter (i.e. print one invoice, not all of them.)
- You want the pdf called "InvoiceXXX.pdf" where XXX is the invoice number.

Dim strFile As String
DoCmd.OpenReport "rptInvoice", acViewPreview, , "InvoiceID = " &
Me.InvoiceID
If Val(SysCmd(acSysCmdAccessVer)) >= 12# Then
strFile = Environ("HOMEDRIVE") & Environ("HOMEPATH") & _
"\Desktop\Invoice" & Me.InvoiceID & ".pdf"
DoCmd.OutputTo acOutputReport, strDoc, acFormatPDF, strFile, True
End If

If that's not what you want, it is possible to set the Printer object before
you open the report, and then reset it to Nothing again afterwards. If you
want to do that, see:
Printer Selection Utility - Users assign printers to reports
at:
http://allenbrowne.com/AppPrintMgt.html

--
Allen Browne - Microsoft MVP. Perth, Western Australia
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.
Back to top
Login to vote
SAP2

External


Since: Jan 12, 2008
Posts: 20



(Msg. 3) Posted: Tue Oct 27, 2009 7:20 am
Post subject: Re: Printer Choice [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Hello,
I have installed Allen Brownes Printer Selection Utility in Access 2003. So
far it works just fine except that when I print my report it only prints in
black and white and I would like it to always print in color. I have the
printer set to a PDF printer.

Any help?

"Allen Browne" wrote:

> "dave" <dave.TakeThisOut@accessdatapros.com> wrote in message
> news:2E110ACD-554E-436A-ABBF-7D64456FE626@microsoft.com...
> > Access 2007
> > I want to have a macro that prints a form to .pdf.
> > However the .pdf printer is not the default printer.
> > Is there anyway to code changing printers?
>
> This example assumes:
> - You have the PDF add-in installed. If not, see
> http://www.microsoft.com/downloads/details.aspx?familyid=4D951911-3E7E...E6-B059
> - You want to save the PDF to your desktop.
> - In older versions of Access, the code needs to just show a preview.
> - You need to apply a filter (i.e. print one invoice, not all of them.)
> - You want the pdf called "InvoiceXXX.pdf" where XXX is the invoice number.
>
> Dim strFile As String
> DoCmd.OpenReport "rptInvoice", acViewPreview, , "InvoiceID = " &
> Me.InvoiceID
> If Val(SysCmd(acSysCmdAccessVer)) >= 12# Then
> strFile = Environ("HOMEDRIVE") & Environ("HOMEPATH") & _
> "\Desktop\Invoice" & Me.InvoiceID & ".pdf"
> DoCmd.OutputTo acOutputReport, strDoc, acFormatPDF, strFile, True
> End If
>
> If that's not what you want, it is possible to set the Printer object before
> you open the report, and then reset it to Nothing again afterwards. If you
> want to do that, see:
> Printer Selection Utility - Users assign printers to reports
> at:
> http://allenbrowne.com/AppPrintMgt.html
>
> --
> Allen Browne - Microsoft MVP. Perth, Western Australia
> Tips for Access users - http://allenbrowne.com/tips.html
> Reply to group, rather than allenbrowne at mvps dot org.
>
>
Back to top
Login to vote
Display posts from previous:   
       Home -> Office other -> General Discussions All times are: Eastern Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Categories:
 Windows XP
 Windows Vista
 Windows Other
 Office
  Office Other
 Security
  • Home |
  • Shareware |
  • Windows Tips |
  • Hot Offers |
  • FREE Newsletters |
  • Arcade |
  • Forums |
  • eBooks |
  • About WUGNET |
  • Partners |
  • Contact

  • WUGNET Privacy Policy |
  • Link to WUGNET |
  • IT Support