Thursday 3 March 2011

The SaveAs2() Issue in MS Word 2010 and the Com Exception error.

If at some point you get an error by calling the SaveAs method in Microsoft Word when you are working with SharePoint 2010 at the same time, just do the following.

1- Deactivate all teh features,

2- Click MSWord on File->SaveAs, and type a Sharepoint Location.

3. After saving it, check in that file.

4. Close Word and open it again. It will work

This is the line of code that it could bring you some headaches:

_DocumentToBeSaved.SaveAs2(

ref _sFileName, ref _oObj, ref _oObj, ref _oObj, ref _oObj, ref _oObj, ref _oObj, ref _oObj, ref _oObj, ref _oObj, ref _oObj, ref _oObj, ref _oObj, ref _oObj, ref _oObj, ref _oObj);

No comments: