Mail merge code stopped working, please advise

I have a chunk of code taken from these forums that handles mail merge using notes docs as source data and displaying in word using a template. It has been working fine but suddenly it has stopped, and I can’t see why. it stops at the line that trys topen the data source from c:\temp\data.doc - the doc is there and has the correct data in it, and has no locks or pws or anything. Why has it stopped working, any ideas?

gather all the data…

Call WordDoc.saveas(“C:\temp\data.doc”)

Call WordDoc.Close

Set MergeDoc = MergeView.GetDocumentByKey(templateName,True)

Set rtitem = MergeDoc.GetFirstItem(“Body”)

Set object = rtitem.GetEmbeddedObject(“Microsoft Word Document”)

Set WordDoc2 = object.Activate(True)

WordDoc2.MailMerge.MainDocumentType = wdFormLetters

Call WordDoc2.MailMerge.OpenDataSource(“C:\temp\data.doc”) ’ stops at this point

WordDoc2.MailMerge.SuppressBlankLines = True

Call WordDoc2.MailMerge.Execute(True)