I have an Access 2007 application that generates a pdf report. Before I switched domains, the pdf files would open without issue from Access. After I switched to the new domain, I get an extremely annoying nag about "Potentiall y dangerous files. Are you sure you want to open this file?" I tried the regedit fix I found online and also changed the setting in Trust Center about "Check Microsoft Office documents that are from or link to suspicious websites." Neither worked. My code uses the FollowHyperlink method to open the pdf. Is there another way to open a pdf which would circumvent the nag? Does anyone know a fix for this issue? Thanks in advance for any guidance.
Office Nag Message Appears When Opening Hyperlink
Collapse
X
-
Tags: None
-
I use this function to open URLs, I haven't had any trouble with it. It would be sidestepping your problem.
Code:Function OpenAttachment(ByVal sTargetAndLocation As String) As Boolean OpenAttachment = False Dim dReturn As Double dReturn = Shell("explorer.exe " & sTargetAndLocation, vbNormalFocus) If dReturn >= 0 Then OpenAttachment = True End FunctionLast edited by jforbes; Sep 26 '14, 07:45 PM. Reason: I probably should be using an Integer for the return code. -
That works a treat. Thanks a megabyte. Why it lets Shell open the link, but will not allow FollowHyperlink to open it is not readily apparent.Comment
-
Home for a quick lunch and back out:
This is what I have used for years and doesn't require the shell:
Hyperlinks: warnings, special characters, errors - Allen BrowneComment
Comment