Ashish Tripathi
Ashish Tripathi

Reputation: 666

MS Word VSTO-Add In SaveAsUI = false not working for MS Word of Office 365 but working for other Versions of MS Word

I'm writing a VSTO Add-In for MS Office. My Add-In has to support various versions of MS Office, Starting from Office 2010 to Office 365.

This Add-In enables saving the data directly on cloud. For this I'm suppressing Word's Standard SaveAsUI and showing my Custom Save Dialog.

for suppressing MS Word's Save Dialog:

 void Application_DocumentBeforeSave(Word.Document Doc, ref bool SaveAsUI, ref bool Cancel)
    {

        Cancel = true;
        SaveAsUI = false;

 SaveDocument saveDialog = new SaveDocument(Doc, this.Application)
            {
                ChangeCaption = SetWindowCaption
            };
            saveDialog.ShowDialog();
    }

This works (Not Showing MS Word Save Dialog) in all the versions of office other than Office 365.

How do I suppress the standard Save Dialog in MS Word of Office 365?

Upvotes: 1

Views: 124

Answers (1)

Ashish Tripathi
Ashish Tripathi

Reputation: 666

I've been able to solve this issue. i.e. Suppress the Office 365 Save Dialog. To Do so:

  1. Launch your MS Word

  2. Go to File -> Options. It'll launch a Window, 'Word Options'.

  3. Click on 'Save' tab

  4. Turn On the Option below and click 'OK'

    'Don't Show the Backstage when opening or saving files through keyboard shortcuts'

Word Options Dialog

Upvotes: 1

Related Questions