Quantcast
Channel: .NET Framework Class Libraries forum
Viewing all articles
Browse latest Browse all 8156

convert word doc to xml

$
0
0
i want to convert MS word doc to XML.

but how can i specifiy the save file type in oDoc.SaveAs(.......) .
in framework 2.0 doesnt have xml format - wdFormatXML

(object Format = (int)Microsoft.Office.Interop.Word.WdSaveFormat)

but in http://msdn2.microsoft.com/en-us/library/microsoft.office.interop.word.wdsaveformat(VS.80).aspx
it has been specified.

but when i complile the code it says no such member as, wdFormatXML.

Any thoughts and solutions please??????????????????

following is my code.

oWordApplic = new Microsoft.Office.Interop.Word.ApplicationClass();
....
...
oDoc = //oWordApplic.Documents.Open2002(ref fileName, ref missing,ref readOnly,
oWordApplic.Documents.Open(ref fileName, ref missing, ref readOnly,
ref missing, ref missing, ref missing, ref missing, ref missing, ref missing,
ref missing, ref missing, ref isVisible,ref missing,ref missing,ref missing);

oDoc.Activate();

Viewing all articles
Browse latest Browse all 8156

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>