Solved

Error 5180 Word Cannot open document template

Posted on 2016-10-13
1
51 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 21

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

Independent Software Vendors: 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

You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
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…
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 …
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

627 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