PDA

View Full Version : Word 2003 .dot macro behaviour



a15457
12-30-2010, 09:32 PM
Hey all,

I've had a look around but cannot find the right answer to my question so here I go ... throwing it out to the world ...

I have a need to create a document template that has a couple of simple macro's in it. But when I create a child document (.doc) from the .dot template file none of the macro's come over with them. From the reading I've done this seems to be a design feature of Word, so what I need to work out now is how I can get around this behaviour.

The purpose of the document is a new user request form, the Macro's populate data into some drop down list fields and others populate data into other fields depending on choices made.

The Macro's work just fine but just need to get them into the child documents automagically.

Idea's anyone?

Cheers,

DAVE

:)

fumei
12-31-2010, 10:12 AM
Can you do this from the template? I mean, can you do it at the document creation? Because if that works, then it is fairly simple to do.


The purpose of the document is a new user request form, the Macro's populate data into some drop down list fields and others populate data into other fields depending on choices made.

Can this be put onto a userform? If so, have the userform come up when the document is created. They fill in the userform, and everything gets populated into the document.

Alternative #1: put a toolbar button, or a menu item, or a keyboard shortcut, that calls up your macros. They should be callable form the document, as long as the template file is available.

If you absolutely must have the macro procedures in the new document, export them into .bas files, and then on document creation, import them into the document.