Hey,
Some tweak adjustments:
Code
Private 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 CreatePDFForms()
Dim PDFTemplateFile, NewPDFName, SavePDFFolder, LastName As String
Dim ApptDate As Date
Dim CustRow, LastRow As Long
Dim Sheet1 As Worksheet
Set Sheet1 = Sheets("Sheet1")
With Sheet1
LastRow = .Range("A" & Rows.Count).End(xlUp).Row
PDFTemplateFile = .Range("B16").Value
SavePDFFolder = .Range("B18").Value
ShellExecute 0, "Open", PDFTemplateFile, "", "", vbMaximizedFocus
Application.Wait Now + 0.00006
For CustRow = 5 To 5
LastName = .Range("A" & CustRow).Value
ApptDate = .Range("G" & CustRow).Value
Next
End With
End Sub
Display More
If in cell B16 you have a full URL (path) like "C:\MyDoc.pdf" it should be open.
For the rest of the code I am not so sure of the real meaning and purpose.
If you need further assistance please provide more details.
Cheers,
Adrian B.