mail merge causes word problem
I am running a mail merge from vb6 using Word 2003. My code produces the mail
merge documents like expected. When Word is opened though, on the left panel
it lists all the merge documents as recoverable documents. Why is this?
This is my closing code from VB6
FillBreederReg wrdDataDoc, iRow, lname, SSN, lname, Address1, city,
State, zip, Phone, strAssoc1, strAssoc2, strAssoc3, strAssoc4
wrdDataDoc.Save 'this is required here for word 2003 else you will get
error 5631 (kb article 828388)
wrdDataDoc.Close False
'merge the information
wrdMailMerge.Destination = wdSendToNewDocument
wrdMailMerge.Execute False
wrdApp.Options.PrintBackground = False
wrdApp.ActiveDocument.PrintOut
wrdApp.ActiveDocument.Close False
'close the original files
wrdDoc.Saved = True
wrdDoc.Close False
' This seemed to be necessary in prior versions of Word like 2000)
' wrdDoc.ActiveWindow.Close False
' wrdApp.Quit
Set wrdSelection = Nothing
Set wrdMailMerge = Nothing
Set wrdMergeFields = Nothing
Set wrdDataDoc = Nothing
Set wrdDoc = Nothing
Set wrdApp = Nothing
Any help on this would be appreciated.
date: Thu, 2 Mar 2006 07:27:41 -0800
author: sparty1022