I am getting the following pop up (see error.jpg). I am using the following code to open files on the server, and want to know how to keep it from asking.prompting this every time. Is there a better way to code it to prevent this, or is it unavoidable?
I am really stumped by this, I can get it to open the files, but it uses internet explorer (however Adobe is the default for pdfs if you double click the file). I was hoping there was a generic way of doing this as it will be put on a few computers and I dont know if the install directory is the same for telling it to use c:/program files/...../acrobat.exe to open the file.
Ill attach the file, but I dont how anyone could test it as the link is on the server.
I dont know if part of the problem is me telling it to go to "G:/Fire/Private/PDF PFP/" + the pre-plan # + ".pdf"
I tested to see if it would work and had a msgbox pop up with the output file and it is telling it the right file name. I put that in the run box of the start menu and it opens the file fine in adobe. tell it to open via access and it opens in internet explorer.
I was using the same basis as the aerial map (which works fine) but keep getting this security box. Ive tried it on 3 computers too to make sure it wasnt some extra security feature that was on the computer.
Hopefully that is a little clearer than mud.
Thanks
PS - Ive also tried the application.followhyperlink with no success either.
Code:
Private Sub pfp1button_Click()
Dim strLinkUrl As String
Dim strPath As String
Dim strAddr() As String
strPath = "G:/Fire/Private/PDF PFP/"
strLinkUrl = [Pre-Plan #] & ".pdf"
strAddr = Split(strLinkUrl, "", , vbTextCompare)
strLinkUrl = ""
For i = LBound(strAddr()) To UBound(strAddr())
strLinkUrl = strLinkUrl & strAddr(i) & "+"
Next i
strLinkUrl = strPath & Left(strLinkUrl, Len(strLinkUrl) - 1)
Debug.Print strLinkUrl
Me.pfp1button.HyperlinkAddress = strLinkUrl
End Sub
Ill attach the file, but I dont how anyone could test it as the link is on the server.
I dont know if part of the problem is me telling it to go to "G:/Fire/Private/PDF PFP/" + the pre-plan # + ".pdf"
I tested to see if it would work and had a msgbox pop up with the output file and it is telling it the right file name. I put that in the run box of the start menu and it opens the file fine in adobe. tell it to open via access and it opens in internet explorer.
I was using the same basis as the aerial map (which works fine) but keep getting this security box. Ive tried it on 3 computers too to make sure it wasnt some extra security feature that was on the computer.
Hopefully that is a little clearer than mud.
Thanks
PS - Ive also tried the application.followhyperlink with no success either.