View Full Version : How to distinguish between explicit save and autosave


Birger Niss
02-16-2006, 11:44 AM
Hi,

Is there anyway to distinguish between an explicit, user-initiated save and
an autosave in DocumentBeforeSave in a Word AddIn?

Best regards
Birger

Cindy M -WordMVP-
02-18-2006, 10:43 AM
Hi Birger,

> Is there anyway to distinguish between an explicit, user-initiated save and
> an autosave in DocumentBeforeSave in a Word AddIn?
>
Not as far as I know. Unless by "Add-in" you mean code in a Word template.
Then it should be possible.

OR: you remove Word's menu and toolbar buttons and block out the keyboard
shortcut. Replace the buttons with your own. There's no way you can replace
the keyboard shortcut without including a VBA project. Keyboard shortcuts in
Word can only be assigned to VBA Code, not to outside add-ins. This code could
be part of a template Add-in, however.

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 8 2004)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question or
reply in the newsgroup and not by e-mail :-)

Birger Niss
02-20-2006, 01:26 PM
Hi Cindy,

By AddIn I do mean a true AddIn (dll).
In my AddIn I intercept the DocumentBeforeSave event to pop up a dialog.
This obviously is extremely annoying during an autosave.

I this particular project using templates is not an option.

Anyway, thanks for your input.

Best regards
Birger


"Cindy M -WordMVP-" <C.Meister-C@hispeed.ch> wrote in message
news:VA.0000ba04.0059ac9a@speedy...
> Hi Birger,
>
>> Is there anyway to distinguish between an explicit, user-initiated save
>> and
>> an autosave in DocumentBeforeSave in a Word AddIn?
>>
> Not as far as I know. Unless by "Add-in" you mean code in a Word template.
> Then it should be possible.
>
> OR: you remove Word's menu and toolbar buttons and block out the keyboard
> shortcut. Replace the buttons with your own. There's no way you can
> replace
> the keyboard shortcut without including a VBA project. Keyboard shortcuts
> in
> Word can only be assigned to VBA Code, not to outside add-ins. This code
> could
> be part of a template Add-in, however.
>
> Cindy Meister
> INTER-Solutions, Switzerland
> http://homepage.swissonline.ch/cindymeister (last update Jun 8 2004)
> http://www.word.mvps.org
>
> This reply is posted in the Newsgroup; please post any follow question or
> reply in the newsgroup and not by e-mail :-)
>

Cindy M -WordMVP-
02-23-2006, 09:42 AM
Hi Birger,

> By AddIn I do mean a true AddIn (dll).
> In my AddIn I intercept the DocumentBeforeSave event to pop up a dialog.
> This obviously is extremely annoying during an autosave.
>
I was afraid of that :-) Yes, this topic has come up before in these
Office.Developer groups. A Google search would probably turn those up. If I
recall correctly, in one of the discussions (dating back a couple of years)
a Microsoft person even said there's no way to distinguish.

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 8 2004)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question or
reply in the newsgroup and not by e-mail :-)