Solved

Error 5180 Word Cannot open document template

Posted on 2016-10-13
1
46 Views
Last Modified: 2016-10-30
I use a macro to change a template.  This allows me to quickly hide certain styles containing information that my target audience does not need to see, without changing the actual contents of the document (I have another macro to change it back).  It works fine, and looks something like this:
    With ActiveDocument
        .UpdateStylesOnOpen = True
        .AttachedTemplate = "Comments"
    End With
My problem is that, using Word 2013, it complains that the macro is not located in my 'Documents' directory.  If I move the .doc file to the Documents directory it works properly, but I do not want my Documents directory cluttered up with a bunch of .dot(m) files. That, I assume, is partly why older versions of Word used a Templates directory.

I looked at another page and followed instructions to tell Word (using Windows 7, in my case) where such a directory would be [ File > Options > Save, and then put the address into the 'Default personal templates' location box], but that doesn't seem to work.

How can I get Word, and hopefully other Office programs, to look in the right place for templates?
0
Comment
Question by:Alan Humm
1 Comment
 
LVL 20

Accepted Solution

by:
crystal (strive4peace) - Microsoft MVP, Access earned 500 total points
ID: 41842547
you can customize the Word Options:
File, Options, Save -- and specify the path for "Default personal templates location"
 Word Options, Save locationsIf the template runs code, you probably also have to allow code to run for that location:
File, Options. Trust Center, click "Trust Center Settings..."
Word Options, Trust Centerand then add the location in Trusted Locations Word Options, TrustedLocations since I am a programmer, I trust all my drives at the root.  I also allow trusted locations on my network.
1

Featured Post

Industry Leaders: 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

Outlook Free & Paid Tools
Access developers frequently have requirements to interact with Excel (import from or output to) in their applications.  You might be able to accomplish this with the TransferSpreadsheet and OutputTo methods, but in this series of articles I will di…
This video walks the viewer through the process of creating Hyperlinks for the web and other documents. Select the "Insert" tab: Click "Hyperlink":  Type "http://" followed by a web address to reference a website or navigate to a document to ref…
The view will learn how to download and install SIMTOOLS and FORMLIST into Excel, how to use SIMTOOLS to generate a Monte Carlo simulation of 30 sales calls, and how to calculate the conditional probability based on the results of the Monte Carlo …

756 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