Merging documents with ImportTemplate

Apr 8, 2010 at 6:23 AM

Hi,

I would like to simply merge two docx documents so I'm using the <w:customXml element="ImportTemplate"> tag with the absolutepath attribute set to the second document, but the in the output document the customXml tag remains just without attributes.

Is this the correct way to merge two documents? What's wrong with this attempt?

 

Thank you

Coordinator
Apr 9, 2010 at 6:30 AM

You're using the wrong property to specify the template to be imported. Use 'uri' instead.
Check the documentation here: http://flexdoc.codeplex.com/wikipage?title=Elements

Also: ImportTemplate will only import the main document part, so no headers and footers.

 

Apr 13, 2010 at 4:52 AM

Thank you, it works like a charm!