Hi =?Utf-8?B?UGV0ZXIgRmF1bGhhYmVy?=,
> I have a document based on Normal. I attach the document to a new custom
> template via Tools, Templates and Add-Ins.
>
> Is it possible to run a automacro, from the new attached template, after I
> attached the template?
Automatically you mean, without you needing to call it? No. You should be
able to use a macro to do the attaching, then calling the macro, though.
Along these lines
Sub AttachAndRun()
Dim path As String
path = "C:\Documents and Settings\[user name]\My Documents\xyz.dot"
ActiveDocument.AttachedTemplate = path
Application.Run "'path'!Module1.AutoOpenX"
End Sub
Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 17 2005)
http://www.word.mvps.org
This reply is posted in the Newsgroup; please post any follow question or
reply in the newsgroup and not by e-mail :-)