...

View Full Version : Open PDF in VB6 help!!!!!!!



tman62
08-10-2009, 08:08 PM
Hi, I need to open a PDF from an install CD when the “installation instruction” box is clicked. I have everything programmed except this.

I am having trouble getting Adobe reader to open the file on the CD. Also I want it to use any version of reader that the person may have installed on the local drive. But install reader 9 if no version is detected.


Can this be done? if so anyone have some code to do it???

Thanks

Ted

oracleguy
08-10-2009, 08:50 PM
You can do it with the ShellExecute API call in Windows. http://www.vbaccelerator.com/codelib/shell/shellex.htm

tman62
08-10-2009, 09:29 PM
Thanks, looked at thew link, bit over my head. i had a guy doing things for me but he is no longer around.

anyone what to work with me on this. (for $$$$ of course)

e-mail me tedneese at hotmail dot com


below is what i am trying to do.




Private Sub imgGraphics_Click(Index As Integer)
Dim strPath As String 'Path String
Dim strPath2 As String '2nd path string
Dim intFreeFile As Integer 'File handle

'Path to setup
strPath = App.Path & "\setup.exe"

'Path for readme file
strPath2 = App.Path & "\readme\install_instructions.pdf"

'Install graphics
If Index = 2 Then

'Hide the form
Me.Hide

'Call setup program
Shell strPath, vbNormalFocus

'Unload the form
Unload Me

'Exit graphics
ElseIf Index = 3 Then

'Unload splash screen
Unload Me

'Open readme document


Shell "\reader\AcroRd32.exe \readme\install_instructions.pdf"

End If

End Sub



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum