Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

newby question: embed macro in Word document

Status
Not open for further replies.

Loekje

IS-IT--Management
Mar 23, 2001
49
NL
Must be a simple thing: we have some VBA code in a MS-Word 7 template. But somehow when we make a new document with that template the macro is not saved in the document itself.
Where do I set the template that it will save the macro into the document?

TIA very much

Loek Gijben
 
Hi,

It's something with Your Word.

Check out in what template You save the macro and what template You are using when reopen the doc.

Tibi
 
Hi 1127,

I don't know in what template it is saved, but the document is sent by e-mail as an attachment, so the reciever does not have the same templates available.

But I (and I'm a bit simple, you know), I always thought you could save a macro into a document. How else do these word macro-viruses work in an ordinary .doc file?

Where can I find more info (besides diving into 3-inch thick VB-bibles?)

TIA,
Loek Gijben
 
From MS Word Help

Copy styles, AutoText entries, toolbars, or macros

You can copy styles, macros, and custom toolbars between templates and documents; you can copy AutoText entries between templates only.

1 On the Tools menu, click Templates and Add-Ins.

Show me

2 Click Organizer, and then click the tab for the items you want to copy.
3 To copy items to or from a different template or file, click Close File to close the active document and its attached template or to close the Normal template. Then click Open File, and open the template or file you want.
4 Click the items you want to copy in either list, and then click Copy.

To select a range of items, hold down SHIFT and click the first and last items. To select nonadjacent items, hold down CTRL as you click each item.

Note If you copy toolbars to which you've assigned custom macros, you must also copy the macros.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top