Solved

Error 5180 Word Cannot open document template

Posted on 2016-10-13
1
28 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 19

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

PaperPort has a feature called the "Send To Bar". It provides a convenient, drag-and-drop interface for using other installed software, such as Microsoft Office. However, this article shows that the latest Office 2016 apps (installed with an Office …
Entering a date in Microsoft Access can be tricky. A typo can cause month and day to be shuffled, entering the day only causes an error, as does entering, say, day 31 in June. This article shows how an inputmask supported by code can help the user a…
This video shows where to find the word count, how to display it, and what it breaks down to in Microsoft Word.
This Micro Tutorial well show you how to find and replace special characters in Microsoft Word. This is similar to carriage returns to convert columns of values from Microsoft Excel into comma separated lists.

914 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now