11

Does anyone know how to make a template viewable in Word 2007? I created a template, Experiments.dotm, added it using Add-Ins, but when I try to create a module within it, get an error message: "Project is unviewable"

Martijn Pieters
  • 1,048,767
  • 296
  • 4,058
  • 3,343
Bruce
  • 153
  • 1
  • 1
  • 10

3 Answers3

6

The explanation for the "Project is unviewable" problem can be found here:

It is important to differentiate between opening an add-in file (for example, by clicking File and then clicking Open) and loading an add-in (for example, by using the Add-Ins button on the Developer tab). Open a file when you want to edit it and test it. Load the file as an add-in when you want to use it.

In summary, if you load VBA as an add-in, then any time you want to edit it, you have to open the .dotm in Word (File... Open) before you try to access it in the VBA editor.

Reg Edit
  • 6,719
  • 1
  • 35
  • 46
0

Make sure you are adding the template using the "Document Template" button on the developer tab, and that you specify the template under "Document Template" (i.e. replace Normal.dot with your custom template). If you instead add the template tot he "Global templates and add-ins" section, you will receive the "Project is unviewable" error when trying to expand it in the VBA window.

kad81
  • 10,712
  • 3
  • 38
  • 44
  • 1
    No, there's no need for it to replace your normal document template. See [here](http://msdn.microsoft.com/en-us/library/ff604039(v=office.14).aspx) for a good article about adding an additional template for the add-in. – Reg Edit Jul 23 '14 at 17:20
  • Okay @RegEdit however the OP's question was about how to replace the normal template, not whether or not they should (maybe put your comment on the question instead of on this answer). – kad81 Jul 24 '14 at 05:25
  • look again, the OP's question isn't about that at all :) It's about creating an additional template `Experiments.dotm`, added as an add-in. – Reg Edit Jul 25 '14 at 08:04
-1

This is often caused by locking the project in a newer version of excel than you are trying to unlock it.

See MS support

JMax
  • 26,109
  • 12
  • 69
  • 88
  • The OP's question was regarding Word, not Excel, and the link you provided is a problem specific to Access databases. – kad81 Jul 24 '14 at 05:27