Hey guys, this may seem like a really basic question but I just can't get my head around why it won't work!!
I have a form where the user can select a MS Word document to convert to XHTML and save this file in a different directory. However, I keep getting 'COMException was unhandled' on this line:
These are declared before the above code:Code:aDoc.SaveAs(ref fileSave, ref missing, ref fileformat, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing);What have I done wrong?Code:strFileName = fDialog.FileName; string saveFile = strFileName.Substring(0, strFileName.Length - 4); object saveFilename = saveFile + ".html"; string mPath = @"D:\Temp\"; object fileSave = mPath + saveFilename; object fileformat = Word.WdSaveFormat.wdFormatFilteredHTML;




Reply With Quote
