Click here to Skip to main content
15,890,043 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
C#
private void SaveAs(string strFileName, Word.Document d)
        {
            object missing = System.Reflection.Missing.Value;
            object fileName = strFileName;
            object format = Word.WdSaveFormat.wdFormatDocumentDefault;
            d.SaveAs(ref fileName, ref format, 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, ref missing);
        }



I have added save button on my ribbon. When I'm going to save the active document the error was "Command Failed".

Please help. Thanks!
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900