0
Answer

how to save a word document?

Administrator

Administrator

21y
1.4k
1
Hi guys, should be a rather easy question, but I simply can´t find the answer. I looked at Mike Gold´s article on this site to get a Word document and open it - works perfectly. But now I have to save the same Word file in a different space and I am trying to use the method .SaveAs of the document, but I get a 'System.Runtime.InteropServices.COMException' with the reason of "typeconflict". Here is my code for explanation: object fName = "C:/MyDocuments/WordTest.doc"; object fileFormat = Word.WdSaveFormat.wdFormatDocument; object lockCom = false; object pwd = null; object atrf = false; object wPwd = null; object ror = false; object ettf = false; object images = false; object saveFormsData = true; object saveAsLetter = false; aDoc.SaveAs(ref fName, ref fileFormat, ref lockCom, ref pwd, ref atrf, ref wPwd, ref ror, ref ettf,ref images, ref saveFormsData, ref saveAsLetter); As soon, as the last line is debugged, the Exception occurs. If you know any way on saving a Word Document, please let me know, help is really appreciated. Thank you, Gilthanas