Word 2003: Add-Inn

P

Peter Faulhaber

Hi All,

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?
 
C

Cindy M.

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 :)
 

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