
4,396 questions
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Hi all,
Do you have any ideas/scenarios to refresh whole contents in Word document which is attached VSTO document-level addin?
The best scenario for me is "Re-open" the another document with keeping the attachment of VSTO addin to extract not only the document-body contents but also header, footer and page-setup related contents. I've tried "InsertXML" method, succeeded in cloning the body but failed in cloning the contents outside...
private static void SimpleClone(Document docFrom, Document docTo, string saveAsDocTo)
{
(docTo.Range() as Range).InsertXML((docFrom.Range() as Range).WordOpenXML);
docTo.SaveAs2(FileName: saveAsDocTo);
}