/SPAN>/SPAN>/SPAN>When we want to save the word document in another format (Like XML, Compatible to word 97 etc..)/P>
For the first criteria we can simply call the save method of the word document. This function does not take any parameter and saves the document at the same location where it was opened. Here is the code snippet./P>
oWordDoc.Save();/P>
For the second option we need to use the SaveAs function of the word document object. /SPAN>The function takes many parameter, but the most important and required parameter in the first parameter which takes the path where the document will be saved./P>
object fileName = “FullPath_for_saving_the_word_document”;/P>
oWordDoc.SaveAs(ref fileName, ref missing, ref missing, ref /SPAN>/P>
/SPAN>missing, ref missing, ref missing, ref missing, ref missing, ref/P>
/SPAN>missing, ref missing, ref missing, ref missing, ref missing, ref /P>
/SPAN>missing, ref missing, ref missing);/P>
For the third option we need to pass one more parameter (second parameter) to the saveAs function telling the format in which the document should be saved. /SPAN>The format has to be of type object but made form one of the values in the enumeration Microsoft.Office.Interop.Word.WdSaveFormat/P>
object fileName = “FullPath_for_saving_the_word_document”;
object Format = Microsoft.Office.Interop.Word.WdSaveFormat.wdFormatDocument;
or
////object Format = Microsoft.Office.Interop.Word.WdSaveFormat. wdFormatXML;/P>
oWordDoc.SaveAs(ref fileName, ref Format, ref missing, ref /SPAN>/P>
/SPAN>missing, ref missing, ref missing, ref missing, ref missing, ref/P>
/SPAN>missing, ref missing, ref missing, ref missing, ref missing, ref /P>
/SPAN>missing, ref missing, ref missing);/P>
Vikram/P>