View Single Post
  #9  
Old October 21st 09, 06:59 PM posted to microsoft.public.outlook.program_addins
GR[_2_]
external usenet poster
 
Posts: 8
Default Outlook 2007 Meeting Item Send Button


Hi Ken,

Thanks for looking at this. I'm glad it's not just me who sees this!

I have been playing with using the Item.Send() event in the meanwhile.
I think I might be able to get away with using this although it is
nowhere as efficient. I am having to write a lot more code than if I
could just capture that button's event when pressed. One particular
problem I have is that in Outlook 2007 by the time the Item.Send()
event is called, an occurrence of a recurring meeting that was opened,
modified and has had its "Send" button pressed now has had it's
RecurrenceState changed from "occurrence" to"exception" which was
messing up how I work with this item further downstream. It looks like
I can check this ahead of time though in the Item.Write() event which
comes first and it still is representative of the RecurrenceState of
the item when the user first opened it.

I really would like to be able to intercept that button though. Thanks
for all your help. Please keep me posted if you discover something.


On Oct 21, 10:36*am, "Ken Slovak - [MVP - Outlook]"
wrote:
SendDefault and SendItem should cover both of those buttons.

The command tag is what should be used for repurposing a built-in control.
so that should be OK.

I just played with this on a Mail.Compose form. I was also able to handle
the idMso="SendItem" button but not the idMso="SendDefault" button. I'm
doing some more digging on this but so far it looks like that button is not
able to be repurposed.

Does an alternative of handling the item.Send() event work for you?

--
Ken Slovak
[MVP - Outlook]http://www.slovaktech.com
Author: Professional Programming Outlook 2007.
Reminder Manager, Extended Reminders, Attachment Options.http://www.slovaktech.com/products.htm

"GR" wrote in message

...

Here are the XML strings and their results that I've tried without
success:

#1

customUI xmlns="http://schemas.microsoft.com/office/2006/01/
customui"
commands
command idMso="SendDefault" onAction="SendButton_Action" /
/commands
/customUI

RESULT: My callback function ("SendButton_Action") never gets called
when pressing the large "Send" button on the form nor when pressing
the "Office/Send" menu item.

#2 (using SendItem instead of SendDefault)

customUI xmlns="http://schemas.microsoft.com/office/2006/01/
customui"
commands
command idMso="SendItem" onAction="SendButton_Action" /
/commands
/customUI

RESULT: My callback function ("SendButton_Action") never gets called
when pressing the large "Send" button on the form. It DOES get called
when pressing the "Office/Send" menu item.

#3

customUI xmlns="http://schemas.microsoft.com/office/2006/01/
customui"
* *ribbon
* * * tabs
* * * * *tab idMso="TabAppointment"
* * * * * * group idMso="GroupSend"
* * * * * * * *button idMso="SendDefault"
onAction="SendButton_Action" /
* * * * * * /group
* * * * */tab
* * * /tabs
* */ribbon
/customUI

RESULT: When the code that sets the XML runs, Outlook pops up an error
box:

(when using SendDefault: button idMso="SendDefault"
onAction="SendButton_Action" /)

* * * * * * * * * "Custom UI Runtime Error"
* * * * * * * * * "controls in a built-in group cannot be modified:
SendDefault"

(when using SendItem: button idMso="SendItem"
onAction="SendButton_Action" /)

* * * * * * * * * "Custom UI Runtime Error"
* * * * * * * * * "controls in a built-in group cannot be modified:
SendItem"

So the code that sets the XML string always gets called but so far,
nothing seems to capture that large Send button on the form when you
create a Meeting request.

Thanks.


Ads