Error on mail merge


#1

Hi there,
I’m getting the following error when calling the mail merge function:

Error calling MailMerge:

Method: GenerateDocument() --> Expected header drawing, but got something else. Please report this file to word@aspose.com.

Could you please advise? I’m attaching the related document template.

Another question: do you have any recommendations re: Word’s limit of 40 characters for merge field names? If I use a data source when inserting merge fields, only the first 40 characters are used. However, I can then edit the merge field to extend this beyond 40 characters - though the display of the merge field within the document still only goes to 40 characters.


#2

Hi,

There were probably some defects of header layout in the original document. I’ve made some slight changes there and attached the working version. Please check it.

With respect to the latter question: possibly MS Word truncates the names, maybe related to some limitations of the earlier versions. Since Aspose.Word works perfectly with the long names, the only problem could be editing such fields in MS Word.


#3

Thanks for your response - but where can I find the attachment you indicated?


#4

Sorry Dmitri - I just found the attachment! Could you tell me what change you made to the document, so we can avoid this issue in other templates?


#5

I've simply copied/pasted the content into a blank document that had the same page settings as the original one. Your template looks okay but it still has some defect, probably in a header. We're examining it and we will report you if some sort of layout problem is found.