Hi,ps all the code is posted in the original thread referenced above.
I think you're refering to :
http://www.vbaexpress.com/forum/showthread.php?t=2331
That topic is about Outlook and I see a lot of code in there but I don?t see any lines of code that have any relation with the Word ?Mailmerge Object model?!
What I do see is these lines:[VBA]
Set wdDoc = wdApp.Documents.Open(WordDocFilePath)
wdFileName = FinalReportFolder & "\ServiceCallLog_" & i & ".doc"
wdDoc.SaveAs wdFileName
wdDoc.Close[/VBA]
Seams like the code wich comes first to the above lines is filling an excel sheet with only one row off values and saves the sheet.
The lines a copied out the topic:
Then the Word doc is opened and the data is bound (if binding was there) to the document. And yes when you save as a document that?s bound in this way you get another bound document..
From the top I?d suggest something like:
[VBA] Set wdDoc = wdApp.Documents.Open(WordDocFilePath)
wdFileName = FinalReportFolder & "\ServiceCallLog_" & i & ".doc"
With wdDoc.MailMerge
.Destination = wdSendToNewDocument
.Execute
With wdApp.ActiveDocument
.SaveAs wdFileName
.Close
End With
End With
wdDoc.Close[/VBA]
Presuming the binding to the source is made I think this should work..If not then come back and I?ll rebuild you?re environment on my pc to test what does work..
Enjoy!