Hi,
Not sure if this is the correct group but here goes.....
I have inherited a VB 6.0 app and as part of its functionality, it
creates a Word 2003 document from a saved custom template then
printouts the page before closing.
The issue being reported is that if the user already has word running,
after creating a new document from the VB application, Word then says
that "Normal.dot" is in use and cannot be saved.
In a nutshell, this process should all be seemless \ transparent
without out prompts from Word. I am told this was the case before the
upgrade from a previous version of word (2002).
The Code being used is....
'Set objWrdDoc = GetObject(, "Word.Application")
If objWrdDoc Is Nothing Then
bNewWrdApp = True
Set objWrdDoc = CreateObject("Word.Application")
End If
' Associate our custom template with word instance.
Set doc = objWrdDoc .Documents.Add("MyFile.dot")
'
'
' Assignment of data to bookmarks etc
'
'
'
objWrdDoc.Application.PrintOut
objWrdDoc.ActiveDocument.SaveAs "My.doc"
objWrdDoc.Application.DisplayAlerts = False
Do While objWrdDoc .BackgroundPrintingStatus = 1
Loop
'If bNewWrdApp = True Then
objWrdDoc.Application.Quit
objWrdDoc.Application.DisplayAlerts = True
Else
doc.Close
End If
Set doc = Nothing
Set objWrdDoc = Nothing
Jonathan West - 08 Jun 2007 10:24 GMT
Add the following line just before the Application.Quit
objWrdDoc.Application.NormalTemplate.Saved = True
This will kid Word into believing that nothing in normal.dot has changed,
and so it doesn't need to be saved when Word is closed.

Signature
Regards
Jonathan West - Word MVP
www.intelligentdocuments.co.uk
Please reply to the newsgroup
> Hi,
>
[quoted text clipped - 46 lines]
> Set doc = Nothing
> Set objWrdDoc = Nothing