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

Free Support Forum - aspose.com

Insert a word document into a FormField

Hello!


I have a word document with several FormFields, and I have a second word document with other FormFields, and Formating.
I need to insert the complete second document into a FormField in the first document.
With interop i can do this with the “FormField.Result.InsertFile” command.

Is it possible with the Aspose.Words product?

Thx

Hi

<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Thanks for your inquiry. You can use code from the following article to insert one document into another:

http://www.aspose.com/documentation/.net-components/aspose.words-for-.net/howto-insert-a-document-into-another-document.html

Hope this helps. Please let me know if you need more assistance, I will be glad to help you.

Best regards,

Hi


Thanks for your quick reply.
I have found that article, but it inserts the document after the FormField.
I need to insert the document into the FormField.
Is it possible?

Thx

Hi Viktor,

Thanks for your inquiry.

I'm afraid the result in a field usually just consists of Run nodes. The method above cannot be used easily in this case as it expects the insert node to be a paragraph or table.

Could you please clarify exactly what you are trying to achieve? Complex documents are not normally inserted into form fields. If you attach your template and current code here we can give some further suggestions.

Thanks,