P
Paul
We are developing a Telephony Toolbar component as a Microsoft Outlook Addin.
Briefly it has dialing capabilities that then sends via a proprietary API to
a VoIP softswitch in the network.
A feature of this addin consists of getting the selected text from the
Preview Pane and dialling it using the context menu. We have successfully
implemented this feature in Outlook 2002 and 2003 but not in Outlook 2007
that uses Word(“_WwG†class) instead of Internet Explorer(“Internet
Explorer_Server†class) to display an email. So far, we have succeeded to get
the selected text from the Preview Pane using Microsoft Active Accessibility
but we do not know how to attach a menu item to the Preview Pane’s context
menu.
Outlook 2007 provides several context menu events but no one is suitable for
the Preview Pane. So we tried several approaches:
• Calling get_CommandBars method of the Word (embedded in Outlook)
Application object
CComPtr<MSWORD::_Application> spApplication;
//getting the application.
//...
// trying to get the command bars.
CComPtr<Office::_CommandBars> spCmdBars;
HRESULT hr = spApplication->get_CommandBars(&spCmdBars);
Returns the undocumented value 0x800a180e.
• Creating a Word addin.
The addin works fine when Word is not embedded but not when it is. It seems
that in the first case Word uses Normal.dotm template and NormalEmail.dotm in
the second.
• Using Microsoft UI Spy we found out the following hierarchy (Name, Class,
ControlType):
“â€,“NeT UI Tool Windowâ€,â€ControlType.Paneâ€
“â€,“NetUIHWND†â€,â€ControlType.Paneâ€
“â€,“â€â€,â€ControlType.Customâ€
“â€,Ҡâ€,â€ControlType.Menuâ€
“â€,“â€â€,â€ControlType.Customâ€
“Copyâ€,Ҡâ€,â€ControlType.MenuItemâ€
We can get the NetUIHWND window’s handle but we do not know how to inset a
new “menu itemâ€.
• Using Microsoft Spy++ we found out that a “Microsoft Word†OpusApp window
is created when Outlook is launched. We can get the handle of this window or
of any child window but do not know how to make use of it from this point.
The first time a context menu in Preview Pane is instantiated a “Textâ€
“MsoCommandBarPopup†window is created. We can get its handle too but do not
know about MsoCommandBarPopup class.
Thank You
Briefly it has dialing capabilities that then sends via a proprietary API to
a VoIP softswitch in the network.
A feature of this addin consists of getting the selected text from the
Preview Pane and dialling it using the context menu. We have successfully
implemented this feature in Outlook 2002 and 2003 but not in Outlook 2007
that uses Word(“_WwG†class) instead of Internet Explorer(“Internet
Explorer_Server†class) to display an email. So far, we have succeeded to get
the selected text from the Preview Pane using Microsoft Active Accessibility
but we do not know how to attach a menu item to the Preview Pane’s context
menu.
Outlook 2007 provides several context menu events but no one is suitable for
the Preview Pane. So we tried several approaches:
• Calling get_CommandBars method of the Word (embedded in Outlook)
Application object
CComPtr<MSWORD::_Application> spApplication;
//getting the application.
//...
// trying to get the command bars.
CComPtr<Office::_CommandBars> spCmdBars;
HRESULT hr = spApplication->get_CommandBars(&spCmdBars);
Returns the undocumented value 0x800a180e.
• Creating a Word addin.
The addin works fine when Word is not embedded but not when it is. It seems
that in the first case Word uses Normal.dotm template and NormalEmail.dotm in
the second.
• Using Microsoft UI Spy we found out the following hierarchy (Name, Class,
ControlType):
“â€,“NeT UI Tool Windowâ€,â€ControlType.Paneâ€
“â€,“NetUIHWND†â€,â€ControlType.Paneâ€
“â€,“â€â€,â€ControlType.Customâ€
“â€,Ҡâ€,â€ControlType.Menuâ€
“â€,“â€â€,â€ControlType.Customâ€
“Copyâ€,Ҡâ€,â€ControlType.MenuItemâ€
We can get the NetUIHWND window’s handle but we do not know how to inset a
new “menu itemâ€.
• Using Microsoft Spy++ we found out that a “Microsoft Word†OpusApp window
is created when Outlook is launched. We can get the handle of this window or
of any child window but do not know how to make use of it from this point.
The first time a context menu in Preview Pane is instantiated a “Textâ€
“MsoCommandBarPopup†window is created. We can get its handle too but do not
know about MsoCommandBarPopup class.
Thank You