LouieGrandie
Technical User
I have code to open any document based on what is entered in a field.
Private Sub Command13_Click()
Dim strInput As String
On Error GoTo Error_GetMTR
strInput = Attachment
Application.FollowHyperlink strInput, , True
Exit_GetMTR:
Exit Sub
Error_GetMTR:
MsgBox Err & ": " & Err.Description
Resume Exit_GetMTR
End Sub
Works great. The problem is that if the document is a PDF it just flashes on the screen and does not stay open. If it is a Word doc or Excel file it stays open just fine. Any thoughts on how to get the PDF to stay open?
Visit Sage's Online Community
Private Sub Command13_Click()
Dim strInput As String
On Error GoTo Error_GetMTR
strInput = Attachment
Application.FollowHyperlink strInput, , True
Exit_GetMTR:
Exit Sub
Error_GetMTR:
MsgBox Err & ": " & Err.Description
Resume Exit_GetMTR
End Sub
Works great. The problem is that if the document is a PDF it just flashes on the screen and does not stay open. If it is a Word doc or Excel file it stays open just fine. Any thoughts on how to get the PDF to stay open?
Visit Sage's Online Community