Inconsistency - DisableDefaultAction of CommandBar

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

Inconsistency - DisableDefaultAction of CommandBar
 
Nilesh Padbidri




Posts: 11
Joined: 2006-12-08
Hi,

I am using Add-In Express to develop a plug-in for Excel & Word. The intention is to disallow "Save As" functionality if the file being edited has already been persisted or is existing on the harddisk.

I have captured (WindowActivate / WindowDeactivate / WorkbookActivate / WorkbookDeactivate / SheetActivate / SheetDeactivate / DocumentActivate / DocumentDeactivate) events.

In these events I check if the ActiveDocument or ActiveWorkbook is already existing on the harddisk. If yes then I set DisableDefaultAction of the Build in control for Save As (748) to true else I set it to false.

The problem is it works but not consistently. In some cases the Save As dialog is not displayed and sometimes it is displayed even if it should not be displayed.

What could be the issue with it ? I already have a sample ready, in case you dont want to waste time. Any gives ?

Thanks in advance,
- Nilesh Padbidri.
Posted 19 Dec, 2006 14:31:39 Top
Sergey Grischenko


Add-in Express team


Posts: 7233
Joined: 2004-07-05
Hi Nilesh.

What about the DocumentBeforeSave event with the Cancel functionality? Doesn't it suit your requirements?


P.S. Note that we take up your forum requests in the order we receive them.
Besides, it may take us some time to investigate your issue. Please be sure we will let you know as soon as the best possible solution is found
Posted 20 Dec, 2006 12:59:34 Top
Nilesh Padbidri




Posts: 11
Joined: 2006-12-08
Not really Sergey, because I need to trap a whole lot of other menu commands like Print / Send Mail / Send As Attachment / Send To Fax Recipient etc.

So it is crucial that I need to trap the events like WindowActivate / WindowDeactivate / WorkbookActivate / WorkbookDeactivate / SheetActivate / SheetDeactivate etc and set the "DisableDefaultAction" to FALSE or TRUE in there.

Thanks,
- Nilesh Padbidri.
Posted 20 Dec, 2006 14:09:49 Top
Sergey Grischenko


Add-in Express team


Posts: 7233
Joined: 2004-07-05
Ok, Nilesh. Please send me the sample. I will test it.
Posted 21 Dec, 2006 09:30:29 Top
Nilesh Padbidri




Posts: 11
Joined: 2006-12-08
Sergey, where would you want me to send the sample ?
Posted 22 Dec, 2006 00:44:45 Top
Sergey Grischenko


Add-in Express team


Posts: 7233
Joined: 2004-07-05
Nilesh, I have just sent you an email.
Posted 25 Dec, 2006 17:46:17 Top