What is the eaisest way to launch a .pdf file from a VB program?
Printable View
What is the eaisest way to launch a .pdf file from a VB program?
using ShellExecute I think
VB Code:
Option Explicit Private Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" _ (ByVal hwnd As Long, ByVal lpszOp As String, _ ByVal lpszFile As String, ByVal lpszParams As String, _ ByVal LpszDir As String, ByVal FsShowCmd As Long) _ As Long Private Sub Command2_Click() 'Open a document Dim l As Long l = ShellExecute(Me.hwnd, "Open", App.Path & "\Test.pdf", "", "C:\", vbNormalFocus) End Sub