Annoying problem when opening MSWord

B

Bill S.

Hi,
I "drive" MSWord through the "COM" interface in a VB.NET program. In the
program, a Word object is created/opened (while hidden), which opens a
template, where fields are filled with info from a database, and is printed.
This works great, but when the end user opens Word, all the documents that
were printed open as well. In the program, all documents are closed without
saving changes and the Word object is destroyed. Does this have something to
do with saving documents to the Normal.dot context? Is it possible for the
end user to rename/delete the Normal.dot until this is resolved in the code?
(I don't have access to the situation at the moment). Can anybody indicate
how I might resolve this within the code.

Private mWrd As Word._Application
mWrd = New Word.Application
mWrd.Visible = False
ReportDoc = mWrd.Documents.Open(CStr(ReportDocName), Visible:=False)
 

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