Hi guys,
I must apologise profusely with regards to my lack of reply. I have no excuse, other than laziness, and the fact that the code was all working fine!
Frosty, thank you for the information on mapping, and the detecting of documents. Fortunately, I have managed to get around the mapping issue by having the macro create a temporary document on the desktop of the user, which they can then delete (or if I could get it to work, would be deleted automatically).
snb, thank you very much for the code. I would love to use your simple method, but when I run this code:
Sub M_snb() With GetObject("Q:\Index\Documents\FlatStation Quotation.dotm")
.MailMerge.Execute
.clode 0
End With
End Sub
which refers to the document that I want to merge with, I get the runtime error 4605 on the .MailMerge.Execute line for some reason. It says that the mail merge needs a data source, but I thought that had been set with getobject...have you any idea why this might be?
Another problem, in addition, is that really the document to come from a template file, but am not sure how I might do this. Do you have any ideas?
Thanks, and sorry again for the lack of reply.
dirtychinchilla