Word 2013 - Intercepting Save As and Suppressing the Save As Page

Add-in Express™ Support Service
That's what is more important than anything else

Word 2013 - Intercepting Save As and Suppressing the Save As Page
 
DWPS




Posts: 5
Joined: 2015-02-27
I'm developing code to intercept the Save and Save As functions (I want to force the document to be save to a document management system). Using adxWordEvents, I've added a DocumentBeforeSave event. I can determine if it's a Save or a Save As and if it's a user action or auto save. I can even display a custom form.

With Save, as soon as I select Save, my code is triggered.

My issue is with Save As. When I select Save As, I get a Save As page (one column with Places (OneDrive, Computer, Add a Place) and second column with locations within the place (Computer - My Documents, Desktop, Browse button). As so as I click on a location, my code is triggered.

Is there any way to not show the Save As page? I'm using Word 2013.
Posted 27 Feb, 2015 14:23:24 Top
Andrei Smolin


Add-in Express team


Posts: 18829
Joined: 2006-05-11
Hello,

I'm not sure I understand the description: you call SaveAs in code and this makes Word show the Backstage view? Correct? Or you click SaveAs in the Word UI? If the latter, there's a setting on File | Save, see "Don't show the Backstage when opening or saving files". This is user-controlled however and it seems there's no way to use it in your code.


Andrei Smolin
Add-in Express Team Leader
Posted 02 Mar, 2015 06:19:04 Top
DWPS




Posts: 5
Joined: 2015-02-27
Andrei,

Thanks for the reply. When I trigger Save As, I get this screen:

[img]https://www.dropbox.com/s/n5ib5pvehcbxozh/Save%20As.PNG?dl=0[/img]

Once, I select a location (in my example, My Documents, Desktop or Browse) my code is triggered.

Kent
Posted 02 Mar, 2015 11:22:05 Top
DWPS




Posts: 5
Joined: 2015-02-27
In Options, under Save, I checked the checkbox "Don't show the Backstage when opening or saving files" but I still get exactly the same results.
Posted 02 Mar, 2015 11:45:28 Top
Andrei Smolin


Add-in Express team


Posts: 18829
Joined: 2006-05-11
Do you call Save As in code or in the UI?If code, please let me see it. Do you do this for a newly created document or for a previously saved document (which might have been edited)?


Andrei Smolin
Add-in Express Team Leader
Posted 03 Mar, 2015 05:20:43 Top
DWPS




Posts: 5
Joined: 2015-02-27
Andrei,

I am triggering Save As from UI (select Save As from the File menu or press F12 key).

I get the same result whether it's an entirely new document or a previously saved document.

Thanks for your help!
Posted 03 Mar, 2015 09:02:14 Top
Andrei Smolin


Add-in Express team


Posts: 18829
Joined: 2006-05-11
DWPS writes:
I am triggering Save As from UI (select Save As from the File menu


This essentially means you go to the Backstage! But the Save As item is not a button; it is a tab in Office 2013!

As to F12, it never opens the Backstage for me. See also https://social.technet.microsoft.com/Forums/office/en-US/dc458e32-4a64-4b28-98ba-d86a35db6b78/dont-use-backstage-option-in-office-2013.

Anyway, this doesn't relate to developing an add-in. You can ask an end-user related questions at http://answers.microsoft.com/en-us.


Andrei Smolin
Add-in Express Team Leader
Posted 03 Mar, 2015 09:36:41 Top