1b54d VB Code to print to .pdf
Sign Up |  Live StatsLive Stats    Articles 37,351| Comments 177,394| Members 19,423, Newest mohyal| Online 453
Home Contact
 (Forgotten?): 
    Sikhism
    For best SPN experience, use Firefox Internet Browser!


                                                                   Your Banner Here!    




Click Here to Register/Sign Up Daily Hukamnama Member Blogs Downloads Website Navigation Help Fonts Tags

VB Code to print to .pdf

Our Donation Goal : Why Donate? : Donate Today! : Donate Anonymously (ਗੁਪਤ) : Our Family of Supporters
Goal this month: 500 USD, Received: 115 USD (23%)
Please Donate...
     
Related Topics...
Thread Thread Starter Forum Replies Last Post
2 Questions: Code to exit via cmdExit; Code to hide/disable tool b AndyG Information Technology 5 28-Jul-2006 08:39 AM
Access reports not inheriting print settings from print server lundca Information Technology 1 28-Jul-2006 08:37 AM
Setting the number of copies of a report to print from print previ TKD Information Technology 1 28-Jul-2006 08:29 AM
Validating field within print single record code Karl H Information Technology 1 07-Nov-2005 11:26 AM
RE: Validating field within print single record code Ofer Information Technology 0 07-Nov-2005 11:25 AM


Tags
code, print, pdf
Reply Post New Topic In This Forum Stay Connected to Sikhism, Click Here to Register Now!
  #1 (permalink)  
Old 28-Jul-2006, 08:36 AM
Jennifer Cali's Avatar Jennifer Cali
Guest
 
Posts: n/a
   
   
VB Code to print to .pdf

  Donate Today!   Email to Friend  Tell a Friend   Show Printable Version  Print   Contact sikhphilosophy.net Administraion for any Suggestions, Ideas, Feedback.  Feedback  

Register to Remove Advertisements
I want to print the file to .pdf, but am not sure how to code the VB to do
it. Right now the print is going to the default printer; I need to change the
Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/information-technology/13344-vb-code-to-print-to-pdf.html
printer that it prints to.
--
Thank you! - Jennifer

*







Got anything to share on This Topic? Why not share your immediate thoughts/reaction with us! Login Now! or Sign Up Today! to share your views... Gurfateh!
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 28-Jul-2006, 08:36 AM
Douglas J. Steele's Avatar Douglas J. Steele
Guest
 
Posts: n/a
   
   
Re: VB Code to print to .pdf

Take a look at what Stephen Lebans has at
http://www.lebans.com/reporttopdf.htm

Other options include CutePDF at http://www.cutepdf.com, PDF995 at
http://www.pdf995.com/ and the PDF and Mail Class Library from ACG Software
Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=13344
at http://www.groupacg.com/

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no private e-mails, please)


"Jennifer Cali" wrote in message
news:039B7833-90A2-4272-A54D-D23B0EDA8D2F@microsoft.com...
Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=13344
>I want to print the file to .pdf, but am not sure how to code the VB to do
> it. Right now the print is going to the default printer; I need to change
> the
> printer that it prints to.
> --
> Thank you! - Jennifer



Reply With Quote
  #3 (permalink)  
Old 28-Jul-2006, 08:36 AM
Jennifer Cali's Avatar Jennifer Cali
Guest
 
Posts: n/a
   
   
Re: VB Code to print to .pdf

Hi Doug,
I feel like your new best friend (or that crazy person who asks too many
questions - you decide).

I actually have PrimoPDF on my computer already, and I love it - very easy
to use. I can select "Print" from the file menu and change the printer, but
I'd rather have a button on my form that allows users to print a copy of the
report directly to .pdf format (a shortcut). Currently my VB looks like:

Dim stDocName As String
Dim MyForm As Form

stDocName = "frmMVR"
Set MyForm = Screen.ActiveForm
DoCmd.SelectObject acForm, stDocName, True
DoCmd.PrintOut
DoCmd.SelectObject acForm, MyForm.Name, False

Where in here can I set the printer type? I want it to select the printer
Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=13344
PrimoPDF.
--
Thank you! - Jennifer


"Douglas J. Steele" wrote:

> Take a look at what Stephen Lebans has at
> http://www.lebans.com/reporttopdf.htm
Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=13344
>
> Other options include CutePDF at http://www.cutepdf.com, PDF995 at
> http://www.pdf995.com/ and the PDF and Mail Class Library from ACG Software
> at http://www.groupacg.com/
>
> --
> Doug Steele, Microsoft Access MVP
> http://I.Am/DougSteele
> (no private e-mails, please)
>
>
> "Jennifer Cali" wrote in message
> news:039B7833-90A2-4272-A54D-D23B0EDA8D2F@microsoft.com...
> >I want to print the file to .pdf, but am not sure how to code the VB to do
> > it. Right now the print is going to the default printer; I need to change
> > the
> > printer that it prints to.
> > --
> > Thank you! - Jennifer

>
>
>

Reply With Quote
  #4 (permalink)  
Old 28-Jul-2006, 08:36 AM
Tom Wickerath's Avatar Tom Wickerath
Guest
 
Posts: n/a
   
   
Re: VB Code to print to .pdf

Hi Jennifer,

You might find that one of these methods works for you. You may need to add
a command button to your form to print a report based on the active record in
your form, instead of the form itself.

Printer Selection Utility
http://allenbrowne.com/AppPrintMgt.html

How to automate the process of selecting the printer
for a report in Microsoft Access
http://support.microsoft.com/?id=319317

Programming Printer Settings in Microsoft Access 2002

http://msdn.microsoft.com/library/de...0_printers.asp


Tom Wickerath
Microsoft Access MVP

http://www.access.qbuilt.com/html/ex...tributors.html
http://www.access.qbuilt.com/html/search.html
__________________________________________

"Jennifer Cali" wrote:

> Hi Doug,
> I feel like your new best friend (or that crazy person who asks too many
> questions - you decide).
>
> I actually have PrimoPDF on my computer already, and I love it - very easy
> to use. I can select "Print" from the file menu and change the printer, but
> I'd rather have a button on my form that allows users to print a copy of the
> report directly to .pdf format (a shortcut). Currently my VB looks like:
Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=13344
>
> Dim stDocName As String
> Dim MyForm As Form
>
> stDocName = "frmMVR"
> Set MyForm = Screen.ActiveForm
> DoCmd.SelectObject acForm, stDocName, True
> DoCmd.PrintOut
> DoCmd.SelectObject acForm, MyForm.Name, False
>
> Where in here can I set the printer type? I want it to select the printer
> PrimoPDF.
> --
> Thank you! - Jennifer
>
>
> "Douglas J. Steele" wrote:
>
> > Take a look at what Stephen Lebans has at
> > http://www.lebans.com/reporttopdf.htm
> >
> > Other options include CutePDF at http://www.cutepdf.com, PDF995 at
> > http://www.pdf995.com/ and the PDF and Mail Class Library from ACG Software
> > at http://www.groupacg.com/
> >
> > --
> > Doug Steele, Microsoft Access MVP
> > http://I.Am/DougSteele
Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=13344
> > (no private e-mails, please)
> >
> >
> > "Jennifer Cali" wrote in message
> > news:039B7833-90A2-4272-A54D-D23B0EDA8D2F@microsoft.com...
> > >I want to print the file to .pdf, but am not sure how to code the VB to do
> > > it. Right now the print is going to the default printer; I need to change
> > > the
> > > printer that it prints to.
> > > --
> > > Thank you! - Jennifer

> >
> >
> >

Reply With Quote
  #5 (permalink)  
Old 28-Jul-2006, 08:36 AM
Steve Schapel's Avatar Steve Schapel
Guest
 
Posts: n/a
   
   
Re: VB Code to print to .pdf

Jennifer,

An alternative approach is to open the report in design view, go to the
Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=13344
File|Page Setup menu, on the 'Page' tab select the 'Use specific
printer' option, and then enter your PrimoPDF in there. I think that's
how I would do it.

--
Steve Schapel, Microsoft Access MVP


Tom Wickerath wrote:
> Hi Jennifer,
Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=13344
>
> You might find that one of these methods works for you. You may need to add
> a command button to your form to print a report based on the active record in
> your form, instead of the form itself.

Reply With Quote
  #6 (permalink)  
Old 28-Jul-2006, 08:36 AM
UpRider's Avatar UpRider
Guest
 
Posts: n/a
   
   
Re: VB Code to print to .pdf

Jennifer, the below code works for me. You don't have to mess around with
changing the default printer and then changing it back again. The code
changes the target printer for this report this time. Works for any report,
Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=13344
Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=13344
any printer (Not tested for networked printers). Access 2003.
HTH, UpRider

DoCmd.OpenReport "YourReportName", acViewPreview
Application.Reports("YourReportName").Printer =
Application.Printers("YourPDFPrinter")

"Jennifer Cali" wrote in message
news:039B7833-90A2-4272-A54D-D23B0EDA8D2F@microsoft.com...
>I want to print the file to .pdf, but am not sure how to code the VB to do
> it. Right now the print is going to the default printer; I need to change
> the
> printer that it prints to.
> --
> Thank you! - Jennifer



Reply With Quote
  #7 (permalink)  
Old 28-Jul-2006, 08:36 AM
Jennifer Cali's Avatar Jennifer Cali
Guest
 
Posts: n/a
   
   
Re: VB Code to print to .pdf

Would the name of the printer be the name I see when I select the dropdown or
is there another "name" that is recoginized by the computer?
--
Thank you! - Jennifer


"UpRider" wrote:

> Jennifer, the below code works for me. You don't have to mess around with
> changing the default printer and then changing it back again. The code
> changes the target printer for this report this time. Works for any report,
> any printer (Not tested for networked printers). Access 2003.
> HTH, UpRider
>
> DoCmd.OpenReport "YourReportName", acViewPreview
> Application.Reports("YourReportName").Printer =
> Application.Printers("YourPDFPrinter")
Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=13344
>
> "Jennifer Cali" wrote in message
Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=13344
> news:039B7833-90A2-4272-A54D-D23B0EDA8D2F@microsoft.com...
> >I want to print the file to .pdf, but am not sure how to code the VB to do
> > it. Right now the print is going to the default printer; I need to change
> > the
> > printer that it prints to.
> > --
> > Thank you! - Jennifer

>
>
>

Reply With Quote
  #8 (permalink)  
Old 28-Jul-2006, 08:37 AM
UpRider's Avatar UpRider
Guest
 
Posts: n/a
   
   
Re: VB Code to print to .pdf

Yes, it's the printer name that you see in the Windows print dialog
dropdowns...

UpRider

"Jennifer Cali" wrote in message
news:AE53F29A-5645-412C-9E62-81AD6422390D@microsoft.com...
> Would the name of the printer be the name I see when I select the dropdown
> or
> is there another "name" that is recoginized by the computer?
> --
> Thank you! - Jennifer
>
>
> "UpRider" wrote:
>
>> Jennifer, the below code works for me. You don't have to mess around
>> with
>> changing the default printer and then changing it back again. The code
>> changes the target printer for this report this time. Works for any
Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=13344
>> report,
>> any printer (Not tested for networked printers). Access 2003.
>> HTH, UpRider
Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=13344
>>
>> DoCmd.OpenReport "YourReportName", acViewPreview
>> Application.Reports("YourReportName").Printer =
>> Application.Printers("YourPDFPrinter")
>>
>> "Jennifer Cali" wrote in message
>> news:039B7833-90A2-4272-A54D-D23B0EDA8D2F@microsoft.com...
>> >I want to print the file to .pdf, but am not sure how to code the VB to
>> >do
>> > it. Right now the print is going to the default printer; I need to
>> > change
>> > the
>> > printer that it prints to.
>> > --
>> > Thank you! - Jennifer

>>
>>
>>



Reply With Quote
  #9 (permalink)  
Old 28-Jul-2006, 08:37 AM
Pieter Wijnen's Avatar Pieter Wijnen
Guest
 
Posts: n/a
   
   
Re: VB Code to print to .pdf

  Donate Today!  
It should be the same

Pieter

"Jennifer Cali" wrote in message
news:AE53F29A-5645-412C-9E62-81AD6422390D@microsoft.com...
> Would the name of the printer be the name I see when I select the dropdown
> or
> is there another "name" that is recoginized by the computer?
> --
> Thank you! - Jennifer
>
>
> "UpRider" wrote:
>
>> Jennifer, the below code works for me. You don't have to mess around
>> with
>> changing the default printer and then changing it back again. The code
>> changes the target printer for this report this time. Works for any
>> report,
>> any printer (Not tested for networked printers). Access 2003.
>> HTH, UpRider
>>
>> DoCmd.OpenReport "YourReportName", acViewPreview
>> Application.Reports("YourReportName").Printer =
>> Application.Printers("YourPDFPrinter")
Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=13344
>>
>> "Jennifer Cali" wrote in message
Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=13344
>> news:039B7833-90A2-4272-A54D-D23B0EDA8D2F@microsoft.com...
>> >I want to print the file to .pdf, but am not sure how to code the VB to
>> >do
>> > it. Right now the print is going to the default printer; I need to
>> > change
>> > the
>> > printer that it prints to.
>> > --
>> > Thank you! - Jennifer

>>
>>
>>




--
----------------------------------------
I am using the free version of SPAMfighter for private users.
It has removed 4231 spam emails to date.
Paying users do not have this message in their emails.
Get the free SPAMfighter here: http://www.spamfighter.com/len


Reply With Quote
   Click Here to Donate Now!

Support Us!
Become a Promoter!
Gurfateh ji, you can become a SPN Promoter by Donating as little as $10 each month. With limited resources & high operational costs, your donations make it possible for us to deliver a quality website and spread the teachings of the Sri Guru Granth Sahib Ji, to serve & uplift humanity. Every contribution counts. Donate Generously. Gurfateh!
ReplyPost New Topic In This Forum Stay Connected to Sikhism, Click Here to Register Now!

Bookmarks


(View-All Members who have read this thread : 0
There are no names to display.

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Tools Search
Search:

Advanced Search
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

BB code is On
Smilies are On
[IMG] code is On
HTML code is On
Trackbacks are On
Pingbacks are On
Refbacks are On

» Active Discussions
sikhs have any role...
By mohyal
Today 23:34 PM
0 Replies, 1 Views
Is intigration is there...
By mohyal
Today 23:24 PM
0 Replies, 1 Views
Stockholm riots throw...
Today 23:22 PM
5 Replies, 56 Views
Paneer: what I have...
Today 22:29 PM
8 Replies, 62 Views
How Many Sikhs Have...
Today 21:55 PM
698 Replies, 51,716 Views
Woolwich Killing: The...
Today 21:21 PM
19 Replies, 230 Views
Who are Brahmin Sikhs?
By mohyal
Today 20:59 PM
13 Replies, 890 Views
How does Sikhi help you...
Today 18:52 PM
47 Replies, 1,195 Views
Transgenderism ... Right...
By Kaylee
Today 17:55 PM
31 Replies, 1,376 Views
Is Science a Religion?
Today 15:04 PM
12 Replies, 2,015 Views
Rochester Gurdwara...
Today 10:55 AM
2 Replies, 79 Views
US Congress panel passes...
Today 04:22 AM
0 Replies, 42 Views
Harmeet Kaur Took the...
Today 03:40 AM
0 Replies, 64 Views
Rozana Reports (ਪੰਜਾਬੀ...
Today 01:43 AM
319 Replies, 7,707 Views
Sikh Spokesman (ਪੰਜਾਬੀ...
Today 00:36 AM
182 Replies, 4,622 Views
» Books You Should Read...
Powered by vBadvanced CMPS v3.2.3
All times are GMT +6.5. The time now is 23:36 PM.
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2013, vBulletin Solutions, Inc.
Search Engine Optimization by vBSEO 3.6.0 PL2 Copyright © 2004-12, All Rights Reserved. Sikh Philosophy Network


Page generated in 0.56873 seconds with 32 queries
0