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

Free Support Forum - aspose.com

URI resolver for INCLUDTEXT field

Does Aspose.Words support a mechanism to resolve the URI of an INCLUDETEXT merge field?

What I mean by this is: if a document contains the following merge field:
{ INCLUDETEXT “pvfc:/mydocument.docx” }
the uri “pvfc:/mydocument.docx” can (of course) not by resolved by Aspose. (pvfc:/ is an unknown protocol).

Our Java application server, however, knowns how to handle this uri. It refers to a document in a document management system.

We are looking for a machanism where, when Document.getMailMerge.execute() fails to handle the uri, calls a custom uri-resolver that gets a second chance to find and return the document, based on the uri.

Or, alternatively, a mechanism where ALL uri’s are resolved bij a custom uri-reslover:

Something like:
Document.getMailmerge.setUriReslover( MyDocumentManagementSystemURIResolver );

Hi Wim,

Thanks for your inquiry. Please note that Aspose.Words mimics the same behavior as MS Word does. Aspose.Words does not support the uri “pvfc:/mydocument.docx”. Please check the field codes of include text field from here.

In your case, I suggest you please insert the document e.g mydocument.docx into main document using the code example share in following documentation link.

Hope this helps you. Please let us know if you have any more queries.