Catch events from pre-existing buttons in Outlook 2007

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.
0
Utf
2/22/2010 6:47:02 PM
outlook.program_vba 490 articles. 0 followers. Follow

6 Replies
762 Views

Similar Articles

[PageSpeed] 25

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.

-- 
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


"Stephan Steiner" <StephanSteiner@discussions.microsoft.com> 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. 

0
Ken
2/22/2010 10:52:45 PM
Thanks for the good information.I like this event.


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


-- 
PeterKesel
------------------------------------------------------------------------
PeterKesel's Profile: 1529
View this thread: http://www.thecodecage.com/forumz/showthread.php?t=181520

[url=&quot;http://www.thecodecage.com&quot;]Microsoft Office Help[/url]

0
PeterKesel
2/23/2010 11:27:53 AM
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

"Ken Slovak - [MVP - Outlook]" 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.
> 
> -- 
> 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
> 
> 
0
Utf
3/30/2010 5:00:01 PM
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.

-- 
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


"Stephan Steiner" <StephanSteiner@discussions.microsoft.com> 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

0
Ken
3/30/2010 5:37:19 PM
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
0
Utf
5/4/2010 3:27:15 PM
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.

-- 
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


"Stephan Steiner" <StephanSteiner@discussions.microsoft.com> 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 

0
Ken
5/4/2010 4:46:47 PM
Reply:

Similar Artilces:

Access 2007 corruputs Access 2000 files if you edit a query. Help!
I have a database that I made a small edit to on my Vista machine running access 2007. The database is on a network shared drive (not ntfs). The query still opens fine on access 2007, but on my XP machine running office 2000, when I open or try to edit the query, Access 2000 just closes with no error message at all. There is also no entry made in the application event log. When I attach my debugger, Visual Studio reports an unhandled exception at 0x1b018900 in MSACCESS.EXE Access violation writing 0x00040ffc The debug window in the debugger also lists: First-chance exception at 0x3008753...

How to get ID of a button & bitmap in a BitmapButton???
Hii all, I am using BitmapButtons in my application and I want to get the ID of the button aswell as the bitmap placed on it using a CWnd pointer to it.If this is not feasible please do help me with how to get a handler to button & bitmap so that I could use the GetDlgCtrlID() function to retrieve the button/bitmap ID’s. A big Thanxxxxxxxxxxxx in advance, Gov. ----- Well if you have a CWnd pointer to the Button. (I think you answered your own question on this one) pButton->GetDlgCtrlID(); or GetDlgCtrlID(pButton->m_hWnd); As far as the Bitmap ID goes, that information is not ...

outlook 2003 e-mail account fails when 2000 replaced
Have checked MS's Knowledge Base, but no hits. After installing Outlook 2003 on XP Pro (as part of an Office 2003 Professional replacement of Office 2000), a newly-added e-mail account cannot be connected to. So, after clicking on 2003 "Test Accounts" get "server found but no response from server" (that's a paraphrase). Office 2000 still available on W98SE box, so can do a side- by-side comparison of account settings between 2003 and 2000 (the screen layouts are different, but the same fields are present). All account settings are the same, and I have ver...

Worksheet_Change Event
Hi, In an attempt to protect my data validation from being deleted, I hav written the following code. However, it seems to run into a 1004 erro and a circular reference that Excel cannot list. Does anybody kno where I am going wrong? More importantly, is this the right approach? code: -------------------------------------------------------------------------------- Private Sub Worksheet_Change(ByVal Target As Range) Dim DataRange As Range Dim c As Range Dim mycount As Integer Worksheets("Sheet1").Unprotect "123456" If Range("F12:G21").SpecialCells(xl...

migrate xls app 2003 to 2007 -- get custom macro button out of des
I created an Excel 2003 app with tons of VBA and custom macro buttons that lie within the sheets. One user at my place has Excel 2007. I went to the trust center and enabled macros and trusting VBA object models... When I place the mouse over a custom macro button and then try to click on the button all it does is to select the button in design mode. How do I get out of the design mode and get to the mode where I can run the macro when I click on the button? Thanks, Rich Developer Tab>Design Mode can be toggled on/off. Assumes button is from Control Toolbox If yo...

Need help printing a single 4x6 postcard in Pub 2007
I set up my printer with the custom size. Then I created a new document in Publisher with the sheet size and page size as 4x6 (6" width consistent in all set ups). When I create my document, the ruler shows 4x6, but when I go to print, it's set up on a 8.5 x 11 page. I also tried setting up a document with multiple pages to sheet using a 6" wide sheet 2 up, but the print preview shows printing in the middle of the page. I've looked at all the help and forum questions I can find, and haven't been able to solve this problem. Any suggestions? Thanks. Which vers...

Office 2007 calender date is wrong
My office 2007 calender is one month off. It shows todays date as January 29, 2010. How can I fix this? -- rhamilton ------------------------------------------------------------------------ rhamilton's Profile: http://forums.techarena.in/members/168708.htm View this thread: http://forums.techarena.in/office-setup/1287401.htm http://forums.techarena.in Is your computer set to the correct date? For example, using Windows XP: Control Panel > Date and Time. Daddy "rhamilton" <rhamilton.43yujb@DoNotSpam.com> wrote in message news:rhamilton.43yuj...

Outlook 2003 Suggest Names feature stops working
Hello I've run into a problem with one of our Outlook 2003 installations. On this particular PC (XP SP2), the Suggest Names feature has spontaneously "forgotten" all of the email addresses in it's cache. It's like all of the email addresses are somehow deleted. The feature is still turned on in Tools, Options, Email Options, Adv Email Options. And any email addresses the user puts in after this problem occurs are remembered, but Outlook doesn't remember any from the day before or earlier. The user hasn't been mucking around with his settings, and this has hap...

Active synch error event id 3005
Hi all I am running exchange 2003 sp1 jsut recently i have a user who everytime he synchs i get an error in the app log on the server, its event ID 3005 Unexpected Exchange mailbox Server error: Server: [thebeast.insuranceskillscenter.com] User: [joeuser@domain.com] HTTP status code: [502]. Verify that the Exchange mailbox Server is working correctly. Any idea on what is causing this? Thanks ...

"Options" ghosted, can't create accounts with Outlook Connector?
Hello, I administer e-mail accounts for my company (20-30 emps). I have set-up several IMAP accounts on Outlook on users' PC's without any problems. We have a new employee who wants me to set up his e-mail on his laptop. He has Outlook (I think it's 2003) and it has Outlook Connector. The "Options" under "Tools" is ghosted, so I cannot create any new accounts on his Outlook, IMAP or otherwise. I tried to add a user through the Connector option, but no go. I suppose that's just for msn or hotmail type accounts. How do I free up the options to ad...

Event ID 57
Hello, We are using 2 servers, the first one is a 5.5sp4 running on NT4 SP6a, the other one is a 2003 running on W2k3 I'm getting event ID 57 on the 2k3 machine, I've tried to apply the solution here: http://support.microsoft.com/?kbid=194589 But still getting the error message, I've increased the threshold from 50 to 1000 and it's still doing the same thing. Anybody ever experienced that issue? TIA CJ I'm getting the same error, same setup as you i tried following http://support.microsoft.com/default.aspx?scid=kb;en-us;300048 with 0 success "John Doe" w...

outlook express #99
I recently upgraded from Office for my old Windows 98 to Office xp. When I tried to use Outlook Express, I am unable to access my attachments. I get a message that "OE removed access to unsafe attachments." How can I get access to these attachments Just have the sender zip the file into a .zip file and send it to you. Outlook automatically strips attachments with specific extensions because if those files are executed, they may damage the system. If they're zipped, you know usually where they came from and can control what runs on your computer. >-----Original Mes...

Catch all email account
is there a way to set up a catch all email account with exchange 2003. Yes i know the implicaitons of doing this but i believe it is the only way to get this person to realize it is not a good idea after a day or two. In news:uu4FR3XHHHA.924@TK2MSFTNGP02.phx.gbl, Andrew Mallette <andrewm270@aol.com> typed: > is there a way to set up a catch all email account with exchange 2003. > Yes i know the implicaitons of doing this but i believe it is the only > way to get this person to realize it is not a good idea after a day > or two. Check out MailBasket at www.turbogeeks.com. ...

how can I add saved e-mails address's in outlook to my contacts
when I reply to e-mails, the e-mail address is saved if I want to e-mail them again, but they are not saved in my contacts if I want to add senders address to a distribution list? R click the address you want to save > Add to Contacts If you think you want to save every recipient automatically (doubtful) you can use a third party utility for that. Or wait until Outlook 2010 where you can save entries in your autocompletion cache to your Contacts. -- Russ Valentine "dhoney" <dhoney@discussions.microsoft.com> wrote in message news:C7CDAC7E-9D12-45EA-8E67-774F...

Outlook and webmail
Can I use Outlook to download my Outlook webmail from our exchange server? Outlook 2000 on Win2000 using an ADSL connection. ...

Option Button #3
1. I have added an option button. It is Surgery Yes (this option is numbered 23) or Surgery NO (this option is numbered 24). 2. B8 is the cell number. 3. I have formatted another cell with the formula =IF(B8=1,"Surgery YES","Surgery NO") per the instructions of Microsoft. 4. However, even if I change to the number 23 or the number 24 following the = sign, the anwer is always Surgery NO even if I toggle between both of the selections. 5. I would appreciate your help concerning this issue. I am trying to make the formula cause the answer to be the dotted option. Hi...

Teaching outlook on campus
Anyone have any success teaching outlook. Any suggestions on how you did it? Were you able to use the software? How did you manage outlook accounts - through exchange??? Thank you for any help! if you're going to be teaching Outlook, it's a good idea to have an Exchange server...what is it you want to teach? If you just want to teach basics of email, you could use Outlook Express with some pop accounts somewhere, perhaps...what is the objective? -- Susan Conkey [MVP] "sakers" <srekasara@gmail.com> wrote in message news:1158099531.352647.242130@i3g2000cwc.googl...

Catch WM_SIZE
Hi, How to catch the WM_SIZE message of a control created dynamically. I mean : BOOL CMyDialog::OnInitDialog() { CDialog::OnInitDialog(); // m_MyControl derived from CWND m_MyControl.Create( NULL, _T(""), WS_VISIBLE, CRect(10, 10, 0, 0), this, 1 ); } LRESULT CMyDialog::WindowProc(UINT message, WPARAM wParam, LPARAM lParam) { switch (message) { case WM_SIZE : // Catch this message but when it is m_MyControl that is resizing. } } Regards, "Erakis" <Erakis@discussions.microsoft.com> wrote in message news:5BC2F5F0-D19B-4B3E-9881-E...

Insertion of existing worksheets in current worksheet
I am running Office 2003 on Win 2000. I have several worksheets that I would like to insert into an open worksheet. Is it possible to do this without opening each of those, and then copying and pasting? TIA AFAIK you must open the files. Better than copy/paste try right click on the sheet name and select move or copy. Use the drop down to select the workbook you want. You have a choice of creating a copy leaving the original intact. HTH "caduser" wrote: > I am running Office 2003 on Win 2000. I have several worksheets that I would > like to insert into an open worksh...

how to catch key stroke events "globally"
How do can one catch key pressed events "globally"? By that, I don't mean by the main app, I mean, say for example you want to create a "panic button". So that say you're running what ever app (not the one you made), and you want to catch/use the escape key as your panic button. The user presses the escape key, and all windows become hidden. The first problem, is catching the escape key, the second is iterating all top level apps/windows. "Martin Ortiz" <martinortiz@optonline.com> skrev i en meddelelse news:u6eERqJ8DHA.488@TK2MSFTNGP12.phx.gbl... ...

Outlook Express Ads
How do I prevent Outlook Express from adding advertisements to the bottom of every email I send? Mike H wrote: > How do I prevent Outlook Express from adding advertisements > to the bottom of every email I send? This newsgroup is for support of Outlook 97, 98, 2000, 2002 & 2003 from the Office family for Intel PCs. For Outlook Express (OE) support try posting in one of these newsgroups: microsoft.public.inetexplorer.ie4.outlookexpress for OE 4.x microsoft.public.windows.inetexplorer.ie5.outlookexpress for OE 5.x microsoft.public.windows.inetexplorer.ie55.outlookexpress for OE 5.5x...

Catching mail for disable user with no mailbox
I have a user ("olduser') in AD who has been gone for a year and never had an Exchange mailbox (pre-migration). As of today, I want to have any inbound mail to "olduser" captured by the SMTP virtual server and sent to another user. I simply gave "otheruser" an additional address of "olduser@domain" and delivery works internally via Exchange, but external senders get a reply: Remote host said: 550 5.7.1 Requested action not taken: mailbox not available. I expect I could delete the old user from AD, but that's not permitted right now. Thanks...

catching VK_SPACE in a CHotkeyCtrl
hi all, when i create a CHotKeyCtrl ( even in a new and empty project in an empty dialog) i cannot catch any VK_SPACE key combination, eg if i press Ctrl+Space the hotkey control immediately shows "None" instead. Also the "Del" key cannot be handled. any ideas Peter ...

Event ID 8331 #5
When i search Google for "event ID 8331", the hits are full When i search Newsgroups, the hits are full But no solutions Where is the right solution ! Thanks ...

What am I catching?
I've got a piece of code, looks something like this : try { savetheworld(); } catch(CException* pe) { telltheuser(); } catch(...) { panic(); } The only thing I ever throw are CExceptions (or classes derived from CExceptions), I've even done _set_se_translator() so I capture C structured exceptions (like our good friend 0xC0000005) and turn then into CExceptions that I throw. And yes, they are pointers to CException objects that I've new'ed up, not the objects themselves. So why is it, every once in a while, I catch something that isn't a CException? Now I realize that&...