Go Premium for a chance to win a PS4. Enter to Win


Document opened through hyperlink not trusted

Posted on 2010-11-20
Medium Priority
Last Modified: 2012-05-10
Have an Access database that displays a list of Word Doc hyperlinks that are mail merge documents.   The docs are merged to a table in the .mdb that is created from the client record that is currently being viewed.  AutoOpen macro in these Word docs merge to new doc, then close original.

These have worked fine in 2003, with hyperlink security and SQL warnings off.  Am now in 2010.
They work fine if browsed to and opened through Explorer but I cannot get rid of securtiy warning messages in 2010 when they are opened via the hyperlink in the db.
In Access and Word I have enabled macros, put the db and doc location in as trusted locations, unchecked everything else to do with opening docs from links etc. etc.

And another funny thing, they open twice when I clcik through the warnings!!, but I only end up with one of them on screen.  I always end up at Letters 2, then Letters 4, then Letters 6.  When I go to log off the TS I have to close Letters 1,3 and 5 which arent even visible!

Simple code in Word doc:

Sub AutoOpen()'
' AutoOpen Macro
' Used in ResolveIT Mail Merge to automaticlly merge to new document On Open
    With ActiveDocument.MailMerge
        .Destination = wdSendToNewDocument
        .SuppressBlankLines = True
        With .DataSource
            .FirstRecord = wdDefaultFirstRecord
            .LastRecord = wdDefaultLastRecord
        End With
        .Execute Pause:=False
    End With
    ThisDocument.Close (False)

End Sub
Question by:Paul-bbc
  • 5
  • 5
LVL 38

Expert Comment

ID: 34185146
Hi Paul,
Have you tried to store the path in a text field, instead of using the Hyperlink data type? I think it would work without the warnings.  Here are some steps to follow:
1.  In creating the text field, use the maximum field size of 255, which is usually always sufficient, but if it isn't , you can run a function (should be easy to find by googling) to convert file and folder names to the shortened "DOS-like" format.
2.    Add the following to your code:
                     Application.FollowHyperlink [FieldName]

Author Comment

ID: 34190921

Unfortunatley I have to try and solve the problem using the set-up as it currently is as this system is distributed to 40 different sites!
LVL 38

Expert Comment

ID: 34191166
OK, can you post the code that creates your hyperlink. The code you posted does not have anything to do with the hyperlink per se.

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.


Author Comment

ID: 34191546
There is no code that produces the hyperlink.  The hyperlink is stored in a hyperlink column in the database.  There are lots of records for lots of different letters in the table.  The hyperlink is a link to a Word mail merge document.

When using the system a user would click a button 'Produce Letter'.  This does nothing to do with the letter but simply fills a table in the database with the client details that are currently being viewed, as all the mail merge docs are merged to this table.  The user is then presented with a form that lists all the documents, each with its own hyperlink, so all the link is doing is opening the document when it is clicked.

Mail Merge doc opens, merges to new doc using its own AutoOpen macro, re the code posted above.

So all I can do is find a way of turning off ll the security warnings or visit 40 sites and amend the system!!
LVL 38

Expert Comment

ID: 34191648
Ok, this should solve your problem:
           see  http://officeone.mvps.org/download/hyperlink_warning.html

Author Comment

ID: 34191718
Problem is I'm using Office 2010 and am aware of registry fixes in previous versions.  As well as the hyperlink warning there was also one disabling the sql warning that pops up when merging.  I have switched both of those off but it does not solve the problem in 2010
LVL 38

Expert Comment

ID: 34196754
The following link applies to MS Office 2010 and 2007:
LVL 38

Accepted Solution

puppydogbuddy earned 1000 total points
ID: 34196861
The comments below are from this link:

edit: note: the warning comes from the OS/Internet security settings (or something) and not from Access. Possibly you can play with some settings there to control this, but from Access there is nothing we can do.
jrickNov 8 2010, 04:16 PM
thanks looks like what i need
I will have to study this to see if I can figure out where to modify it for my files names
it isn't jumping out at me at this time.

Ted2010Nov 13 2010, 10:36 AM
I converted an older Access app to Access 2010. I deleted my OLE objects and am using hyperlinks. I am extremely irritated by the security popup. I searched forums and found no viable answer. Finally, since I have Office 2010 and get free Microsoft online support, I contacted a technician. He stuck with me through numerious emails, but the bottom line is that there is no viable solution. He said the problem is by "design". I guess that is true because the problem (and it IS a problem even if Microsoft thinks it's not a problem) because the problem has existed for the last 7 years! The only "solution" is to hack the registry, which is a reallly ugly solution that also opens up other potential REAL security issues. I can't imaging distributing an app to users and tell them to hack the registry.
The true solution for this problem is for Microsoft to fix the Trusted Sites, which you can set in Access options, but doesn't work. Everyone should get on Microsoft's case to fix this.

Another solution, which this technicial brought up is to use VB shell to open documents yourself. Someone on this site suggested that, also. I'm not much of a VB programmer, but I will check this out. However, my app allows the user to add any kind of object (tiff files, word docs, jpgs, text docs, anything)--I'm not sure how I could code a simple piece of code to handle any object type. For now, I'm living with the security popup, as it's a lot faster to just click "continue" than to go searching through folders for an object. I hope, however, that Microsoft fixes the Trusted Sites which do not work in Access 2010. that's the best solution

Author Comment

ID: 34207623
Hi, thanks for tips, you can see that this is a real problem with no fix for 2010, and interestingly if you follow the link that you gave me re the registry fix which applies to 2007/2010 every Office 2010 application is listed in the 'Applies to' list, except Access 2010!  

I did actually go to that link prior to even posting this as I have used this fix for this application when it was in lower Access versions, to the extent that the registry change was part of my install routine.  I'm  going to accept this as a solution, but with issues, as there really is no solution.  If you see this question again please ignore it as I am going to repost to see if someone has managed to to fix it through some form of other registry hack or Explorer security setting.

Author Closing Comment

ID: 34207630
There really is no fix at the moment

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Ever visit a website where you spotted a really cool looking Font, yet couldn't figure out which font family it belonged to, or how to get a copy of it for your own use? This article explains the process of doing exactly that, as well as showing how…
In a use case, a user needs to close an opened report by simply pressing the Escape (Esc) key. This can be done by adding macro code in Report_KeyPress or Report_KeyDown event.
In Microsoft Access, learn how to use Dlookup and other domain aggregate functions and one method of specifying a string value within a string. Specify the first argument, which is the expression to be returned: Specify the second argument, which …
Office 365 is currently available in five editions. Three of them are for business use: Office 365 Business Essentials, Office 365 Business, and Office 365 Business Premium. Two of them are for home/personal use: Office 365 Home and Office 365 Perso…

885 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question