This project has moved. For the latest updates, please go here.

How to "copy" a header from one document to another with images?

Sep 14, 2015 at 12:09 AM
I am trying to copy the content of a header from one .docx file into another...
I am copying the data like this (for eg)
For Each item In docOut.Headers.first.Paragraphs
    doc.Headers.first.InsertParagraph(item)
Next
But when I but certain things are not carried across correctly (eg tables)... and when the header contains an image it appears to become broken in the document that it was copied to...

I have also tried inserting pictures into the document from the other prior to copying the header content with:
doc.Pictures.AddRange(docOut.Headers.first.Pictures)
Any sugguestions?
Thanks,
Kris