Is it possible for a Word template to inherit/refernce another
template? I'm about to create several templates with different content,
but the same code och forms and would like to store all code and forms
in one template and let other localized templates inherit from a base
template.

BaseTemplate.dot
---- Template_En.dot
-------- English document.doc
---- Template_Se.dot
-------- Swedish document.doc

Re: Template inheritance in Microsoft Word by Shauna

Shauna
Sat Jul 01 19:46:53 CDT 2006

Hi Johan

Word templates don't inherit from one another.

For your purposes what you could do is to create two templates, each with
the content and styles you need. You'll need to set up your styles in each
template. As far as possible, use Word's built-in styles, even if you give
them an additional abbreviated name for each language.

Create a separate .dot file that holds all your code and forms. Then you
only have one lot of code to maintain. Load that as an add-in. If you want
it to load whenever a user starts Word, put it in the user's Word Startup
folder.

Alternatively, and perhaps more likely, you could have code in the template
that loads and unloads the add-in as required. The add-in can contain the UI
(toolbars etc) and all the code.

The following might also help:
What is the relationship between a Word document and its template?
http://www.ShaunaKelly.com/word/templaterelations\index.html

What happens when I attach a new template to my document? or How do I copy
content and settings from a template to a document?"
http://www.ShaunaKelly.com/word/attachtemplate/index.html

Post back if you need more information.

Hope this helps.

Shauna Kelly. Microsoft MVP.
http://www.shaunakelly.com/word


"Johan Nordberg" <johan@aktieguiden.com> wrote in message
news:1151786714.186645.243120@m79g2000cwm.googlegroups.com...
> Is it possible for a Word template to inherit/refernce another
> template? I'm about to create several templates with different content,
> but the same code och forms and would like to store all code and forms
> in one template and let other localized templates inherit from a base
> template.
>
> BaseTemplate.dot
> ---- Template_En.dot
> -------- English document.doc
> ---- Template_Se.dot
> -------- Swedish document.doc
>



Re: Template inheritance in Microsoft Word by Johan

Johan
Sun Jul 02 15:08:02 CDT 2006

Thank you Shauna! I actually found your articles after a bit of
Googleing.

What is the best way to programmaticly load and unload Word addins?

Regards // Johan


Re: Template inheritance in Microsoft Word by Shauna

Shauna
Sun Jul 02 17:11:40 CDT 2006

Hi Johan

Try something like this, with appropriate error checking around it:

Sub LoadMyAddIn()

Dim oAddIn As Word.AddIn
Dim sMyPathAndFileName As String

sMyPathAndFileName = "C:\MyPath\MyAddIn.dot"

On Error Resume Next

'Try to get the add-in
Set oAddIn = Word.Application.AddIns(sMyPathAndFileName)

'If that didn't work, add it to the Add-ins collection and install it
If oAddIn Is Nothing Then
Set oAddIn =
Word.Application.AddIns.Add(FileName:=sMyPathAndFileName, Install:=True)
End If

'And make sure it's installed
If Not oAddIn.Installed Then
oAddIn.Installed = True
End If

If oAddIn Is Nothing Then
MsgBox "Error!"
End If

End Sub


Hope this helps.

Shauna Kelly. Microsoft MVP.
http://www.shaunakelly.com/word


"Johan Nordberg" <johan@aktieguiden.com> wrote in message
news:1151870882.451054.192850@v61g2000cwv.googlegroups.com...
> Thank you Shauna! I actually found your articles after a bit of
> Googleing.
>
> What is the best way to programmaticly load and unload Word addins?
>
> Regards // Johan
>