Create Word 2007 wrapper for Office 2003 document template

A

Astrid

Hello,

I created a 2003 document template with VBA code (not an addin) which needs
to be used in both Office 2003 and Office 2007.
I created a dotm template with ribbon customizations which should act as a
wrapper for the 2003 template.
In the 2003 template I added code in the Document_New and Document_Open
events which checks the version of Word and - if 2007 - sets a VBE reference
to the 2007 wrapper.

Works beautiful!

However I assumed (stupid, never thought about this before) that setting a
reference in the VBE would be different then loading the 2007 template as an
global addin.
I assumed that a reference would be kept in the template (and documents
based on it) and therefor the wrapper wouldn't be visible in other documents.
This seems not to be the case.

Does anybody know if there is another solution to fix this? Or maybe add
some code to the 2007 dotm template so I can limit showing my Ribbon
customisations only to its 2003 companion?

Otherwise I guess the only solution would be to have two different templates
with everything in it for both versions.
My problem with this situation - apart from maintenance of course - is that
most documents will be originally made in Word 2007 and will be modified
later to Word 2003 systems.

Since the original template in this case will be a dotm file, in my opinion
there's no way to attach the 2003 dot file as the new template automatically
if the document is opened on a 2003 system. Since the extension of the
attached template will be different I guess it's not possible to just make
sure the 2003 template is in the same folder as the document, so users should
need to manually reattach.

Any pointers please?
Thanks in advance,
Astrid
 
A

Astrid

Fixed it.
I added an application class module and checked in documentchange,
newdocument and documentopen for the attached template.
I combined this with a getvisible on the tab where all my customisations
'live'.

Seems to work ;-)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top