LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Print Acrobat Reader PDF file from VBA

I'm trying to print a given Acrobat Reader PDF file from VBA. (Office 2000
& Acrobat Reader 6)


I've found a solution. using the follwing link
http://vb.mvps.org/samples/project.asp?id=HyperJmp

Using the ShellExecute WinAPI call, you may execute a 'verb' associated with
a file extensions.
So, declare ShellExecute as follows in a module:

Declare Function ShellExecute Lib "shell32.dll" Alias _
"ShellExecuteA" (ByVal Hwnd As Long, _
ByVal lpOperation As String, _
ByVal lpFile As String, _
ByVal lpParameters As String, _
ByVal lpDirectory As String, _
ByVal nShowCmd As Long) As Long

and print your document using the following call:

Dim result As Long
result = ShellExecute(0&, "print", "\\someserver\somefolder\somefile.pdf",
vbNullString, vbNullString, vbNormalFocus)



Matthias Claes
matthias.claes(-at-)stadsbader.com


 
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
can't print to adobe acrobat georgef Charts and Charting in Excel 2 July 4th 08 04:52 AM
how i can take file from adobe reader and make it read with micr. ahmed nasr Excel Discussion (Misc queries) 0 May 25th 06 05:44 AM
Opening Acrobat Reader using VBA Raam Excel Discussion (Misc queries) 4 November 14th 05 09:34 PM
Print to Adobe Acrobat (2 ws to one file) Michael McClellan Excel Programming 2 June 2nd 04 10:10 AM
how sendKeys to Acrobat Reader Ian Elliott[_3_] Excel Programming 3 October 23rd 03 06:45 PM


All times are GMT +1. The time now is 06:32 PM.

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

About Us

"It's about Microsoft Excel"