single instance of winword.exe needed

W

wongcheming

Hi,

I've created a word 2003 addin in VB and placed some buttons on a
bar. When someone clicks on the button a form comes up which allows
for selection of templates. The problem is when this form opens it
opens another instance of winword.exe and when someone chooses a
template it also creates another instance of winword.exe. The code to
create the form is something like this;

dim frm1 as new form1
frm1.show()

and to open a template is something like this:

Dim aDoc As WordInterop.Document =
DirectCast(WordApp.Documents.Add(fileName, newTemplate, docType,
isVisible), WordInterop.Document)
WordApp.Visible = True
aDoc.Activate()

How can I make these open in the same winword.exe instance and make
them appear in the window menu?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top