We sent sample documents to '[email protected]' today.Please provide feedback and solution asap.
Thanks
Haridhar
Document document1 = new Document();
document1.LoadFromFile(@"document1.docx");
Document document2 = new Document();
document2.LoadFromFile(@"document2.docx");
HeaderFooter header = document1.Sections[0].HeadersFooters.Header;
document2.Sections[0].PageSetup.DifferentFirstPageHeaderFooter = true;
document2.Sections[0].HeadersFooters.FirstPageHeader.Paragraphs.Clear();
foreach (DocumentObject obj in header.ChildObjects)
{
document2.Sections[0].HeadersFooters.FirstPageHeader.ChildObjects.Add(obj.Clone());
}
document2.SaveToFile("Header.docx", FileFormat.Docx2013);