S
saturn
Hi,
I am creating Outlook plug-in using ATL. I have to add a commandbar
(with a button) to only new mail items page. And on the click of that
button I have to execute certain set of code.
For this I have Advised for Outlook::InspectorsEvents on OnConnection.
When the corresponding function is called with new inspector, I checks
if the current item is new mail item.
If item is new mail item then I adds a commandbar and button to the
inspector and sets a bool variable so that I don't need to create it
again in the current session and I removes the commandbar on call to
OnDisconnect. At the same time, i Advise for click of this button
using Office::_CommandBarButtonEvents.
Now my commandbar and is visible whenever I open any new mail item.
All the thinks works fine if there is only one such open mail item and
any click on my button calls the corresponding function.
But if two or more such windows are open simultaneously then none
except the first opened inspector button clicks calls the correponding
function.
Have anyone else have faced any similar problem? What I am doing wrong
here? Any pointers on this will be of great help.
Regards,
Pradeep
I am creating Outlook plug-in using ATL. I have to add a commandbar
(with a button) to only new mail items page. And on the click of that
button I have to execute certain set of code.
For this I have Advised for Outlook::InspectorsEvents on OnConnection.
When the corresponding function is called with new inspector, I checks
if the current item is new mail item.
If item is new mail item then I adds a commandbar and button to the
inspector and sets a bool variable so that I don't need to create it
again in the current session and I removes the commandbar on call to
OnDisconnect. At the same time, i Advise for click of this button
using Office::_CommandBarButtonEvents.
Now my commandbar and is visible whenever I open any new mail item.
All the thinks works fine if there is only one such open mail item and
any click on my button calls the corresponding function.
But if two or more such windows are open simultaneously then none
except the first opened inspector button clicks calls the correponding
function.
Have anyone else have faced any similar problem? What I am doing wrong
here? Any pointers on this will be of great help.
Regards,
Pradeep