Solved

Error 5180 Word Cannot open document template

Posted on 2016-10-13
1
21 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 18

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

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

I would like to show you some basics you can do with Mailings in MS Word. It´s quite handy feature you can use for creating envelopes, labels, personalized letters etc. First question could be what is this feature good for? Mailing can really he…
Preface: When I started this series, I used the term CommandBars because that is the Office Object class that it discusses. Unfortunately, when Microsoft introduced Office 2007, they replaced the standard Commandbar menus with "The Ribbon" and rem…
The viewer will learn how to use a discrete random variable to simulate the return on an investment over a period of years, create a Monte Carlo simulation using the discrete random variable, and create a graph to represent the possible returns over…
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…

706 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

20 Experts available now in Live!

Get 1:1 Help Now