Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default Printing pdf

Is it possible to print a pdf file through vba? If so, how? I would prefer
to do this rather than import into my spreadsheet to keep the size down. I
use Excel 2000.

Robert


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 59
Default Printing pdf

Robert,
If you have Adobe Acrobat or some 3rd party pdf drivers, then:
Application.ActivePrinter = "Adobe PDF on Ne01:"
ActiveWindow.SelectedSheets.PrintOut Copies:=1, ActivePrinter:= _
"Adobe PDF on Ne01:", Collate:=True

(Note: Use record macro to see what default pdf driver is chosen).

"Robert Dieckmann" wrote:

Is it possible to print a pdf file through vba? If so, how? I would prefer
to do this rather than import into my spreadsheet to keep the size down. I
use Excel 2000.

Robert



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default Printing pdf

Perhaps my question was unclear. I already have the pdf file which was
generated from AutoCAD. I want to send that file to a standard printer
along with some related information from the spreadsheet. I am not
looking to create a pdf file from the spreadsheet, I already have that
covered. What I want to avoid is having to import the AutoCAD drawing
into my spreadsheet in order to print it. I am distributing my
spreadsheet to others within the company who do not have access to
AutoCAD & I am trying to simplify the process for them so that they can
print what they need with the click of a button. Sorry for the
miscommunication.



*** Sent via Developersdex http://www.developersdex.com ***
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Printing pdf

I had luck using the Shell command:


Sub Tester2a()
Shell "C:\Program Files\Adobe\Acrobat 5.0\Reader\AcroRd32.exe" & _
" c:\toc1\amcr37-4.pdf", 1
' the following prints the document
Application.SendKeys "^p~", False
End Sub


or if you have .pdf associated with acrobat reader:


Private Sub CommandButton1_Click()
Shell "Start.exe ""D:\My Documents\sm569_Jan2001\tute6.pdf"""
Application.SendKeys "^p~", False
End Sub


--
Regards,
Tom Ogilvy


"Robert Dieckmann" wrote in message
...
Perhaps my question was unclear. I already have the pdf file which was
generated from AutoCAD. I want to send that file to a standard printer
along with some related information from the spreadsheet. I am not
looking to create a pdf file from the spreadsheet, I already have that
covered. What I want to avoid is having to import the AutoCAD drawing
into my spreadsheet in order to print it. I am distributing my
spreadsheet to others within the company who do not have access to
AutoCAD & I am trying to simplify the process for them so that they can
print what they need with the click of a button. Sorry for the
miscommunication.



*** Sent via Developersdex http://www.developersdex.com ***



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel 2003 printing problem--printing 1 document on 2 pages Bons Excel Discussion (Misc queries) 0 December 24th 09 04:15 PM
Excel Printing --Borders are not printing on the same page as data Stup88 Excel Discussion (Misc queries) 1 August 7th 07 09:34 AM
Printing a heading on each new page when printing Brian Excel Discussion (Misc queries) 3 November 15th 06 05:22 PM
Enable Double sided printing contiuously when printing multiple s. Lee Excel Discussion (Misc queries) 1 November 27th 04 01:58 AM
Printing? Worksheets not printing the same on multiple pc's! 43fan Excel Programming 2 April 29th 04 02:34 PM


All times are GMT +1. The time now is 08:47 PM.

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

About Us

"It's about Microsoft Excel"