Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations waross on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Opening pdf files with VB6 1

Status
Not open for further replies.

nardac

Automotive
Feb 5, 2002
8
0
0
GB
I need to display a manual which is saved as a pdf file.
I would like to do this by clicking on a control button in a main menu screen.
Does anyone have any code to do this or alternatively a code that will open the acrobat reader and then the pdf file.

All replies appreciated

Thanks in advance

Regards

Steve Edwards
 
Replies continue below

Recommended for you

You can use ShellExecute to open any file in its associated application.
Code:
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


Sub OpenTheFile()
  Dim hWnd As Long
  Dim sFile As String
  sFile = "C:\Temp\YourFile.pdf"

  Call ShellExecute(hWnd, vbNullString, sFile, vbNullString, vbNullString, vbNormalFocus)

End Sub


DimensionalSolutions@Core.com
While I welcome e-mail messages, please post all thread activity in these forums for the benefit of all members.
 
Status
Not open for further replies.
Back
Top