I need to be able to take the original content of document. Then add the content from the document.xml from another document to the original document. I have been reading about OpenXML which I am required to use. I have found several right up but most
require you to have a new template. But I can not do this. Is there a way to just copy the contents document.xml file from source file and append those contents to the a new paragragh in the other file. (Contents include any xml markup).
ByrdT
0 Points
10 Posts
Merge two Document.xml from two word docs using OpenXML
May 01, 2012 04:34 PM|LINK
I need to be able to take the original content of document. Then add the content from the document.xml from another document to the original document. I have been reading about OpenXML which I am required to use. I have found several right up but most require you to have a new template. But I can not do this. Is there a way to just copy the contents document.xml file from source file and append those contents to the a new paragragh in the other file. (Contents include any xml markup).
adamturner34
Contributor
3834 Points
963 Posts
Re: Merge two Document.xml from two word docs using OpenXML
May 01, 2012 05:58 PM|LINK
Sure.
Open the xmldocument and just grab the outerxml and cast it tostring
dim doc as new xmldocument
Dim s as string = doc.OuterXML.tostring
Allen Li - M...
Star
10411 Points
1196 Posts
Re: Merge two Document.xml from two word docs using OpenXML
May 03, 2012 02:45 AM|LINK
Hi, you can try to achieve this with “DataSet” and “XmlTextReader”, please refer to the examples on the following link:
http://support.microsoft.com/kb/311530
If you have any feedback about my replies, please contact msdnmg@microsoft.com
Microsoft One Code Framework