Hi,
We have A.docm which has a macro. B.docm does not have anything except ‘test’ content. When we try to copy the content from B to A, some how could not view the macro in view->macro option.
We use below code
Document oTarget = new Document("A.DOCM");
oTarget.Sections.Clear();
foreach(Section oSection in oSource.Sections)
{
Section oNewSection = (oTarget.ImportNode(oSection, true) as Section);
oTarget.Sections.Add(oNewSection);
}
oTarget.Save(sSourcePath);
we use the same logic for Word 2003 (A.doc & B.doc). everything works fine.
Thanks