We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Exception for page numbering

Hi.
If I write in document’s template fields “PAGE” or “NUMPAGES”, then method MailMerge returns exception “Object reference not set to an instance of an object.”.

Document = new Document(stream);
Document.MailMerge.CleanupOptions =
MailMergeCleanupOptions.RemoveEmptyParagraphs|
MailMergeCleanupOptions.RemoveUnusedFields|
MailMergeCleanupOptions.RemoveUnusedRegions;
Document.MailMerge.Execute(new RegionsMailMergeDataSource(DataSource, null));

The source of the problem is the flag RemoveUnusedFields. If I delete the flag
RemoveUnusedFields, then method MailMerge works normal.
How can I solve the problem?

This problem is heisenbug. I have attached a document template that should help to reproduce this bug.

Hi there,

Thanks for your inquiry. It would be great if you please create a standalone/runnable simple application (for example a Console Application Project) that demonstrates the code (Aspose.Words code) you used to generate your output document.


As soon as you get these pieces of information to us we’ll start our investigation into your issue.

I have attached a test project.
P.S. Licence is deleted to project

Hi there,

Thanks for your inquiry.

I have tested the scenario and have managed to reproduce the same issue at my side. For the sake of correction, I have logged this problem in our issue tracking system as WORDSNET-9991. I have linked this forum thread to the same issue and you will be notified via this forum thread once this issue is resolved.

We apologize for your inconvenience.

                <div id="dstTextBox" tabindex="0" class="yt-area-textbox yt-area-textbox__textbox">Thank you, we will wait for the decision.</div>
                <div id="dstTextBox" tabindex="0" class="yt-area-textbox yt-area-textbox__textbox">Good afternoon.<br>What is the status of the problem solving?</div>
Hi there,

Thanks for your inquiry.

I would like to share with you that issues are addressed and resolved based on first come first serve basis. Currently, your issue is pending for analysis and is in the queue. We will update you via this forum thread once there is any update available on your issue.

Thank you for your patience.

The issues you have found earlier (filed as WORDSNET-9991) have been fixed in this .NET update and this Java update.


This message was posted using Notification2Forum from Downloads module by aspose.notifier.