Can a MS Word template be converted to VB

By allouttr ·
Templates (macros programmed in VBA) can be used to automate MS Word documents with forms and combo-boxes, etc. Can the VBA code in such a template be transferred to a Visual Basic executable file and still perform the same functions as the template with Word.

John James

This conversation is currently closed to new comments.

Thread display: Collapse - | Expand +

All Answers

Collapse -

Yes and no

by Slayer_ In reply to Can a MS Word template be ...

It can't be directly transferred because of the different libraries.

You can create a word application object and manipulate it, but you cannot easily have the word documents combo box call back to the VB's code.

Collapse -

Converting a Word Template to VB

by iphelion In reply to Can a MS Word template be ...

If you are using the DOCX format then you can use the Microsoft OpenXML API to generate word documents. There is also a nifty tool in the toolkit to allow you to open a word document and it will generate a C# source code class for you that will reproduce that document using the API calls, you can then go in and manipulate whatever you like inside the content.

Some useful links:-



Hope this is helpful,

Collapse -

Reponse To Answer

by Mehul Bhai In reply to Converting a Word Templat ...

Zombie Alert!!! & SPAM???

Collapse -

Zombie Alert!!! & SPAM???

by Mehul Bhai In reply to Can a MS Word template be ...

Zombie Alert!!! & SPAM???

Related Discussions

Related Forums