CharlieSW10
Programmer
I am using the Word 9.0 Object Library and VB 6 to populate a template document with values from an Access form.
The user can then edit the Word document to make any necessary changes before saving it to the directory where I want all these documents held.
At the moment this works fine in most cases:
1st I create the new document >
objWord.Documents.Add Template:=Templatedrivepathparameter & "Policycoverletter.dot", NewTemplate:=False, DocumentType:=0
Immediately afterwards I save it with the filename and path I want:
' objWord.ActiveDocument.SaveAs (Datadrivepathparameter & strPolicynumber)
The problem occurs when the user decides to back out of the Word document without saving. Unbeknown to the user I've already saved the document to set the document path and file name so if they try to run the mailmerge again they don't understand why a document already exists.
Is there any way I can use the Word Object library to set a default path and filename without actually saving the document, and then allow the user to save it using these defaults.
Thank you for any help.
Charlie
The user can then edit the Word document to make any necessary changes before saving it to the directory where I want all these documents held.
At the moment this works fine in most cases:
1st I create the new document >
objWord.Documents.Add Template:=Templatedrivepathparameter & "Policycoverletter.dot", NewTemplate:=False, DocumentType:=0
Immediately afterwards I save it with the filename and path I want:
' objWord.ActiveDocument.SaveAs (Datadrivepathparameter & strPolicynumber)
The problem occurs when the user decides to back out of the Word document without saving. Unbeknown to the user I've already saved the document to set the document path and file name so if they try to run the mailmerge again they don't understand why a document already exists.
Is there any way I can use the Word Object library to set a default path and filename without actually saving the document, and then allow the user to save it using these defaults.
Thank you for any help.
Charlie