Catch events from pre-existing buttons in Outlook 2007

Status
Not open for further replies.
S

Stephan Steiner

Is there a way I can reroute events thrown when standard buttons are being

pushed in Outlook 2007? Specifically, I'd like to replace the entire call

functionality (like OCS does.. normally all calling functionality is bound to

TAPI but when MOC is installed, everything goes to OCS. The PBX I work with

offers different means than TAPI so I need to integrate this somehow. I

managed to almost entirely duplicate the call menus, but it would be much

nicer to just go ahead and do it the way it's done with Office Communicator

without having to bother with commandbars, popup events and ribbons.

There are 3 buttons I need to hook into: The Dropdown button in the Contacts

view, the right click menu on each contact, and the Communication Ribbon when

editing a contact.
 
K

Ken Slovak - [MVP - Outlook]

Get the buttons as CommandBarButton objects and in the click event handlers

do what you want. Then if you want to cancel the default operations set

CancelDefault to true.

"Stephan Steiner" <StephanSteiner> wrote in

message news:E2EE032F-2DB7-408B-BBFB-A5B1A7FDF639@microsoft.com...
> Is there a way I can reroute events thrown when standard buttons are being
> pushed in Outlook 2007? Specifically, I'd like to replace the entire call
> functionality (like OCS does.. normally all calling functionality is bound
> to
> TAPI but when MOC is installed, everything goes to OCS. The PBX I work
> with
> offers different means than TAPI so I need to integrate this somehow. I
> managed to almost entirely duplicate the call menus, but it would be much
> nicer to just go ahead and do it the way it's done with Office
> Communicator
> without having to bother with commandbars, popup events and ribbons.

> There are 3 buttons I need to hook into: The Dropdown button in the
> Contacts
> view, the right click menu on each contact, and the Communication Ribbon
> when
> editing a contact.
 
P

PeterKesel

Thanks for the good information.I like this event.

'HID Kit' (http://www.autoxsport.com/)

PeterKesel

----------------------------------------PeterKesel's Profile: 1529
?t=181520

[url=" " ]Microsoft Office Help[/url]
 
S

Stephan Steiner

Thanks for the hint.. I managed to override the standard call split button so

far and am currently working on the right click menus.

One thing though.. is there a universal way to get the right control

regardless of the locale of Office? I'm on an English Office but most of my

customers will be using German or French versions - so looking for &Call (to

get the call split button) seems rather futile. Can I trust the Id of the

button (2621 for the call button)? And what about the poups? There each

control has the same ID (32768).. so how do you differentiate between the

different items in the popup menu?

Regards

Stephan
wrote:


> Get the buttons as CommandBarButton objects and in the click event handlers
> do what you want. Then if you want to cancel the default operations set
> CancelDefault to true.

> >

>

>
 
K

Ken Slovak - [MVP - Outlook]

The id numbers are universal, even if the names aren't.

I usually get the command id's using a MAPI viewer tool called OutlookSpy

(www.dimastr.com). It lets you view the CommandBars collections for

Inspectors and Explorers and from there you can see the id's.

For ribbon controls I want to repurpose I use the idMso for the ribbon

control I want, gotten from the ribbon schema downloads and set up the

callback for that control using the ribbon XML.

For context menus I use the Outlook 2007 additions to the object model for

handling the various context menus.

I'm not sure which controls you are referring to in your post.

"Stephan Steiner" <StephanSteiner> wrote in

message news:659D0D3C-1E69-41AD-85CE-90D19CD22575@microsoft.com...
> Thanks for the hint.. I managed to override the standard call split button
> so
> far and am currently working on the right click menus.

> One thing though.. is there a universal way to get the right control
> regardless of the locale of Office? I'm on an English Office but most of
> my
> customers will be using German or French versions - so looking for &Call
> (to
> get the call split button) seems rather futile. Can I trust the Id of the
> button (2621 for the call button)? And what about the poups? There each
> control has the same ID (32768).. so how do you differentiate between the
> different items in the popup menu?

> Regards
> Stephan
 
Hi there,




Just stumbeled on this and I cant get this working.


In Outlook 2007, I try to intercept the "Delete"-command, ID: 478.


However, it is never invoked.


I keep the button as local member an I added the eventhandler but it's never called.




Anything special about 2007 that I ought to know?




Thanks in advance,
Karl




The id numbers are universal, even if the names aren't.




I usually get the command id's using a MAPI viewer tool called OutlookSpy


(www.dimastr.com). It lets you view the CommandBars collections for


Inspectors and Explorers and from there you can see the id's.




For ribbon controls I want to repurpose I use the idMso for the ribbon


control I want, gotten from the ribbon schema downloads and set up the


callback for that control using the ribbon XML.




For context menus I use the Outlook 2007 additions to the object model for


handling the various context menus.




I'm not sure which controls you are referring to in your post.




--


















"Stephan Steiner" <StephanSteiner> wrote in


message news:659D0D3C-1E69-41AD-85CE-90D19CD22575@microsoft.com...

> Thanks for the hint.. I managed to override the standard call split button

> so

> far and am currently working on the right click menus.

>

> One thing though.. is there a universal way to get the right control

> regardless of the locale of Office? I'm on an English Office but most of

> my

> customers will be using German or French versions - so looking for &Call

> (to

> get the call split button) seems rather futile. Can I trust the Id of the

> button (2621 for the call button)? And what about the poups? There each

> control has the same ID (32768).. so how do you differentiate between the

> different items in the popup menu?

>

> Regards

> Stephan
 
S

Stephan Steiner

Ken

I must be doing something wrong.. I managed to repurpose certain buttons in

the contacts, but no luck with the call menu. The split button I'm refering

to is called "Call", has a telephone handset as icon, and is in the

Communicate section of the Contact. In the same section we have the E-Mail,

Meeting, ASsign Task, WebPage and Map fuctionality by default.

When clicked the button shows a list of all telephone numbers, including

their label, and clicking one will initiate a call using whatever TAPI TSP

has bee configured (or when you use Microsoft Office Communicator, the

communicator starts dialing).

Finding the idMso isn't easy for outlook as there 19 different files, and

their names don't necessary match what you expect. E.g. there's no

OutlookContactItemRibbonControls.xlsx (that's where I'd expect the contact

ribbon to be explained). However, I think I still found it -

outlookTaskItemRibbonControl.xlsx. It contains a group called

"GroupCommunicate", which includes the following idMso's:

NewMessageToContact, NewMeetingWithContact, DialMenu, Call,

NewTaskForContact, ContactWebPage and MapContactAddress - exactly the things

I listed before - we have every ribbon button in the communicate section.

Yet, when I define my ribbon XML as follows:

<?xml version="1.0" encoding="UTF-8"?
<customUI xmlns="http://schemas.microsoft.com/office/2006/01/customui"

onLoad="Ribbon_Load"
<commands
<command idMso="ForwardAsBusinessCard" onAction="ForwardOverride"/
<command idMso="DialMenu" onAction="DialMenuOverride"/
<command idMso="Call" onAction="CallOverride"/
</commands
<ribbon
</ribbon
</customUI
The only event that is triggered is ForwardOverride - for the other two, the

default action is triggered and the methods DialMenuOverride and CallOverride

are never triggered.

Do you have any idea how to repurpose the items in the list that pops up

when pushing the call button?

Regards

Stephan
 
K

Ken Slovak - [MVP - Outlook]

The schema you want for contacts is "OutlookAddressItemRibbonControls.xls".

There's also a trick that can be used in most cases. Right-click on the

ribbon on the line where the tab names are in an open item and select

Customize Quick Access Toolbar. In the customize dialog select All Commands

in the Choose drop-down. When you hover over a command the schema name will

show up as a tip.

There are 2 commands listed there for Call: Call and DialMenu.

So it looks like your XML should be OK, it just may be an inability to

repurpose those commands. I'm not familiar with playing with those controls,

but I know for a fact that you cannot repurpose the Send button at all. This

may be a similar situation.

"Stephan Steiner" <StephanSteiner> wrote in

message news:BA0AAE7D-2019-40D8-96DD-1F9EC8D44DE9@microsoft.com...
> Ken

> I must be doing something wrong.. I managed to repurpose certain buttons
> in
> the contacts, but no luck with the call menu. The split button I'm
> refering
> to is called "Call", has a telephone handset as icon, and is in the
> Communicate section of the Contact. In the same section we have the
> E-Mail,
> Meeting, ASsign Task, WebPage and Map fuctionality by default.

> When clicked the button shows a list of all telephone numbers, including
> their label, and clicking one will initiate a call using whatever TAPI TSP
> has bee configured (or when you use Microsoft Office Communicator, the
> communicator starts dialing).

> Finding the idMso isn't easy for outlook as there 19 different files, and
> their names don't necessary match what you expect. E.g. there's no
> OutlookContactItemRibbonControls.xlsx (that's where I'd expect the contact
> ribbon to be explained). However, I think I still found it -
> outlookTaskItemRibbonControl.xlsx. It contains a group called
> "GroupCommunicate", which includes the following idMso's:
> NewMessageToContact, NewMeetingWithContact, DialMenu, Call,
> NewTaskForContact, ContactWebPage and MapContactAddress - exactly the
> things
> I listed before - we have every ribbon button in the communicate section.

> Yet, when I define my ribbon XML as follows:

> <?xml version="1.0" encoding="UTF-8"?
> <customUI xmlns="http://schemas.microsoft.com/office/2006/01/customui"
> onLoad="Ribbon_Load"
> <commands
> <command idMso="ForwardAsBusinessCard" onAction="ForwardOverride"/
> <command idMso="DialMenu" onAction="DialMenuOverride"/
> <command idMso="Call" onAction="CallOverride"/
> </commands
> <ribbon
> </ribbon
> </customUI
> The only event that is triggered is ForwardOverride - for the other two,
> the
> default action is triggered and the methods DialMenuOverride and
> CallOverride
> are never triggered.

> Do you have any idea how to repurpose the items in the list that pops up
> when pushing the call button?

> Regards
> Stephan
 
Status
Not open for further replies.
Similar threads
Thread starter Title Forum Replies Date
A How to catch Message Move Event. Outlook VBA and Custom Forms 10
A how to catch folder in folder remove Outlook VBA and Custom Forms 2
J Outlook 2010 Changing events in Outlook calendar via opening file, importing CSV Using Outlook 0
P OWA Settings->Calendar->Events from Email; Setting changes do not hold Using Outlook 1
J Outlook Office 365 Win 10 how do I control background colors of events? Using Outlook 1
G Outlook VBA and Google Calendar ("Events") Outlook VBA and Custom Forms 1
N Using email notification to update calendar events? Outlook VBA and Custom Forms 4
P Outlook custom fields "events" Using Outlook 0
U Catching ModuleSwitch events after "open in new window" Outlook VBA and Custom Forms 2
T Categorizing different colors for a series of events Using Outlook 0
oliv- property "is printed" or catching print events Outlook VBA and Custom Forms 2
oliv- Best practice for catching mailitem.events Outlook VBA and Custom Forms 0
P Outlook 2013 Calendar events not appear on Outlook.com Calendar Using Outlook.com accounts in Outlook 6
V iCloud not syncing categorized calendar events Using Outlook 7
W All Events Disappear from Calendar Display Using Outlook 30
I Multiple events in single request Using Outlook 6
T Events Not Showing In Outlook Today Using Outlook 3
J Calendar view for future events only? Using Outlook 3
G Hiding All Day Events Using Outlook 1
microsvc Populating everyone's calendar with campus events Exchange Server Administration 1
Dave Godbey Sending Categories on Calendar Events Using Outlook 1
C Problem accessing events for folder "username" Server Threw Exception Using Outlook 1
S Syncing Past events from Outlook 2013 to Outlook.com Using Outlook.com accounts in Outlook 6
R How to turn OFF the Reminders for shared calendar events but not off personal Using Outlook 1
F Printing all day events only Using Outlook 3
E Outlook 2013 , iCloud linked calendar, events one hour ahead for about a month Using Outlook 5
B Timed events created in iPhone auto-change to All Day events in Outlook 2010 Using Outlook 2
H Events in Calendar not Bold Using Outlook 1
R [VBA] complicated(?) outlook events - need help with code Using Outlook 15
S Outlook - Reset the number of day-events Using Outlook 0
B Series of calendar events? Or Tasks? Using Outlook 1
D All New Appointments are All Day Events Using Outlook 1
P Printing calendar (work week) with numerous (i.e. >7) all day events... Using Outlook 3
A Outlook CPAO - Printing Monthly calendar with only all day events or catergory Using Outlook 2
S Full-day events Using Outlook 1
T Changing default reminder time for all day events - additional help needed Using Outlook 1
A Share recurrent events with others Using Outlook 2
O pasting text in body of calendar events Using Outlook 5
S Copy Events to Second Calendar or Sync Only "Busy" Events Using Outlook 5
K Private Calendar events Using Outlook 3
N How can i hsve appointments and events to not display start or finish times Using Outlook 2
T Birthday events in Calendar Using Outlook 4
G How to insert a json array into a calendar events Outlook VBA and Custom Forms 1
A how to capture events for next item Outlook VBA and Custom Forms 10
K Unable to receive events from Office::msoControlButton Outlook VBA and Custom Forms 3
M Outlook 2003 Plugin not receiving resize events Outlook VBA and Custom Forms 1
J Get Dates of Recurring Events in Shared Appointment Calendar Outlook VBA and Custom Forms 4
S inspector toolbar buttons get multiple events Outlook VBA and Custom Forms 3
S Re: Capturing Outlook Forms Events Outlook VBA and Custom Forms 1
D Capturing Outlook Forms Events Outlook VBA and Custom Forms 21

Similar threads

Top