I need to open a PDF file from a button, now I know th easy way to do this is via the hyperlink in proporties. The problem is the file may or may not be present. It will always be named exactly the same.
I'm assuming that I need to do this in VBA. I have done the code to check if the folder is present (and make the folder if needs be) and I think I can check to see if the file exists, what I dont know is how to actually open the file.
I'm assuming that I need to do this in VBA. I have done the code to check if the folder is present (and make the folder if needs be) and I think I can check to see if the file exists, what I dont know is how to actually open the file.
Code:
Dim strhelp As String 'The help folder
Dim strHelpDoc As String
strhelp = "c:\GPandDetectionDogTrainingLog\Help"
strHelpDoc = "c:\GPandDetectionDogTrainingLog\Help\Help.pdf"
If Len(Dir(strhelp, vbDirectory)) = 0 Then
MkDir strhelp
End If