Document opened through hyperlink not trusted

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
Who is Participating?
puppydogbuddyConnect With a Mentor Commented:
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
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]
Paul-bbcAuthor Commented:

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!
Cloud Class® Course: Ruby Fundamentals

This course will introduce you to Ruby, as well as teach you about classes, methods, variables, data structures, loops, enumerable methods, and finishing touches.

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.
Paul-bbcAuthor Commented:
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!!
Ok, this should solve your problem:
Paul-bbcAuthor Commented:
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
The following link applies to MS Office 2010 and 2007:
Paul-bbcAuthor Commented:
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.
Paul-bbcAuthor Commented:
There really is no fix at the moment
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.