Exception during mailmerge


During a mailmerge we get the following exception

"Attempted to clone a by reference attribute ‘4060’, but the attribute does not expose the complex attribute interface."

I have attached the document in question. This client has a lot of similar letters all of which are working fine.

Any ideas?


It seems that somehow the document wasn't attached to your message. Try to reattach it.


Done, document attached

See original post


I have tried this code on your document:

string filename = Application.StartupPath + "\\Problem_Letter.doc";

Document doc = new Document(filename);

doc.MailMerge.Execute(new string[] {"WerknemerID", "Achternaam"}, new object[] {"text1", "text2"});

doc.MailMerge.Execute(new string[] {"Tussenvoegsels", "Voorletters"}, new object[] {"text3", "text4"});

doc.Save(System.IO.Path.GetFileNameWithoutExtension(filename) + "_modified.doc");

and it works ok.

Could you please provide an exact code fragment which is causing the exception.