Close Word avoid normal.dot message..

F

Flemming

Hi

I have created a word add-in and after having selected some documents into a
listview the documents is opened and manipulated... with this code...

wdApp = CType(GetObject("", "Word.Application"), Word.Application)

For Each oItem As ListViewItem In Me.lstDocuments.Items
wdDoc = wdApp.Documents.Open(oItem.Tag.ToString)
' some more code
wdDoc.Close(SaveChanges:=True)
Next oItem

wdApp.Quit()

When I quit the extra word application that is started, then I get the
message: "This file is in use by another application or user. (C:\docu...and
settings\.......\normal.dot)

How do I get around this..? I do not need to save any changes in the
normal.dot file.

Thanks,
Flemming
 
F

Flemming

Sorry - that was so easy... apparently I just needed to ask the
question.....

wdApp.NormalTemplate.Saved = True
 

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