Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / July 2007

Tip: Looking for answers? Try searching our database.

Programmatically inserting a Macro into a document

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
John Clark - 04 Jul 2007 15:09 GMT
Help?

I am writing an application to create a Word document - this document
needs the support of a macro to manipulate Style definitions.  

How can my application create a new Macro in the Word document I am
creating?  I have looked through the VBA reference for Microsoft Word,
but I don't see any place to add a Macro to the document.  

Thanks,
-jdc


Doug Robbins - Word MVP - 05 Jul 2007 07:56 GMT
The macro should reside in the template from which you create the new
document.  It will then be available for use with the document.
Alternatively, if the macro resides in a template that is stored in the Word
Startup folder, that template will be loaded as an addin when Word is
started and the macros in it will be available for use with all documents.

Signature

Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP

Help?

I am writing an application to create a Word document - this document needs
the support of a macro to manipulate Style definitions.

How can my application create a new Macro in the Word document I am
creating?  I have looked through the VBA reference for Microsoft Word, but I
don't see any place to add a Macro to the document.

Thanks,
-jdc
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.