Hi Jan,
is it possible to generate (include) macros into the documents by code?
Version 2003, .net 2.
Yes...
If we're talking only Word 2003, then easiest would be to generate an XML
document.
If we're talking back to Word 2000, as mentioned in your other messages,
then it would have to be done using automation. Office provides the VBA
IDE extension object model (VBE) to manipulate VBA projects in Office
applications. In order to see some of this, start Word, press Alt+F11
(opens the VBA IDE).
Tools/References and activate a reference to the Microsoft Visual Basic
for Applications Extensibility library.
Press Ctrl+G (Immediate Window) and type:
ActiveDocument.VBProject
This property and everything you see in the Intellisense list belongs to
the VBE object model. Press F1 and the Help should open to this topic.
Through links and "See also" you can move to other topics. But the best
way to read the Help is to open the VBOB6.CHM file directly (Office 2003
has a lousy, lousy, lousy Help engine).
Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister
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
