none
Word Automation in Silverlight displays "Word Cannot Complete The Save Due To A File Permission Error " after Saving in Local File System RRS feed

  • Question

  • Hello

    I'm currently exploring the MS Word Automation in Silverlight Beta, it's fun but I've got some runtime error in MSWord. I set the "SaveAsUI" parameter to false in the event "DocumentBeforeSave" so that I can dismiss/ or avoid the prompt of SaveFileDialog(because I cannot get the path of after saving it). And then I plan to initiate MSWordDialog "wdDialogFileSaveAs ", but after saving the document message box shows "Word Cannot Complete The Save Due To A File Permission Error "

      void saveEvent_EventRaised(object sender, AutomationEventArgs e) //Using Word SaveFileDialog
            {
              
                e.Arguments[1] = false;
                e.Arguments[2] = false;
                try
                {
                    int wordDialog = objWord.Dialogs(84);
                    if (wordDialog == -1) //int -1 ok button clicked
                    {
                        // Code for saving Document
                    }


                    //document.Close();
                    //objWord.Quit();
                 
                }
                catch
                {
                }
            }

     


    Wednesday, November 23, 2011 11:19 AM

Answers