Hello, All.
In word you can SaveAs and at the bottom of the dialog box you can choose different formats. I'd like to save as a plain text file but using C Sharp code. Below is the code I have that is opening the file, but that save as a plain text syntax is eluding me.
I'm using Visual Studio 2008 and the Microsoft.Office.Interop.Word 12 assembly.
Is anyone clear on the syntax for doing this?
Thanks, everyone.
P
Patrick is a distributor of Republic Magazine ( -free pdf copy downloadable ) and the webmaster of
In word you can SaveAs and at the bottom of the dialog box you can choose different formats. I'd like to save as a plain text file but using C Sharp code. Below is the code I have that is opening the file, but that save as a plain text syntax is eluding me.
I'm using Visual Studio 2008 and the Microsoft.Office.Interop.Word 12 assembly.
Code:
Microsoft.Office.Interop.Word.ApplicationClass word = new Microsoft.Office.Interop.Word.ApplicationClass();
Microsoft.Office.Interop.Word.Document doc = new
Microsoft.Office.Interop.Word.Document();
object nullobj = System.Reflection.Missing.Value;
object fileNme = fileName;//fileName passed to function
doc = word.Documents.Open(ref fileNme, ref nullobj, ref nullobj, ref nullobj, ref nullobj, ref nullobj, ref nullobj, ref nullobj, ref nullobj, ref nullobj, ref nullobj, ref nullobj, ref nullobj, ref nullobj, ref nullobj, ref nullobj);
word.Visible = false;
Is anyone clear on the syntax for doing this?
Thanks, everyone.
P
Patrick is a distributor of Republic Magazine ( -free pdf copy downloadable ) and the webmaster of