|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
How can you open a pdf file from inside vb?
What I need to do is supply the file name and have vb find the file (which I've done) and then open it using Acrobat Reader. I know I can launch the acroread using the shell command, but I don't believe that the windows version of acroread accepts command line arguments to open a file. Any suggestions would be appreciated. NEVER MIND. Apparently it does take command line argument for file input, so I just used the shell command to launch acroread with the file name to open. Last edited by Afshin : July 31st, 2003 at 10:52 AM. |
|
#2
|
|||
|
|||
|
i hope you know the shell command
there is a dos command - start.exe , type start /? on command prompt and see the details go to the directory where the pdf file is, let us say C:\pdf\mypdf.pdf, in the dos prompt execute this command start C:\pdf\mypdf.pdf it will open the file, with its associated application, in our case acrobat reader by this, you can open any type of file in there default application - mp3,wav,etc etc so in vb, you can run the command from shell, that is - shell ("start " + myFileNameWithPath,,,,,) rajiv |
|
#3
|
|||
|
|||
|
Or you can use the ShellExecute API. It opens a document in whatever program is associated with it.
__________________
~ Eric http://www.rlisolutions.com http://www.programmers-corner.com Sign Up for our Programming Newsletter |
|
#4
|
|||
|
|||
|
I'm attempting to print a pdf file from within VB.
Can anyone tell me how to close the pdf application down once I've printed the document out? |
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > Visual Basic Programming > How to open a pdf file in vb? |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|