M
Martynas Kunigelis
Hi all,
I'm developing an Outlook AddIn in C++ using ATL. I've found that I can
programmatically invoke the spelling checker on a new email message being
composed by using the Find method of _CommandBars to locate the Tools menu
control, and then the Spelling... menu item control, and calling Execute()
on them in the right order, i.e.
hr = spTools->Execute();
hr = spSpelling->Execute();
This works like a charm.
Now I need to be able to invoke Tools -> Send/Receive -> Send All of the top
level explorer in Outlook 2002. It seems identical to the above case, except
that the menu item is two levels deep.
However, for some reason this does not work. When I call Execute() on the
Send All menu item (having previously called Execute() on Tools and
Send/Receive in that order), it returns E_FAIL, and the Send All operation
is not performed.
Does anyone have an explanation for this? Is there another way? I know I
could "invoke" the Send/Receive button on the Standard toolbar, but what I
need is "send", not "send and receive".
And I am aware of Redemption::IMAPIUtils:eliverNow(), but that only works
with Exchange.
Thanks in advance!
Best,
Martynas
I'm developing an Outlook AddIn in C++ using ATL. I've found that I can
programmatically invoke the spelling checker on a new email message being
composed by using the Find method of _CommandBars to locate the Tools menu
control, and then the Spelling... menu item control, and calling Execute()
on them in the right order, i.e.
hr = spTools->Execute();
hr = spSpelling->Execute();
This works like a charm.
Now I need to be able to invoke Tools -> Send/Receive -> Send All of the top
level explorer in Outlook 2002. It seems identical to the above case, except
that the menu item is two levels deep.
However, for some reason this does not work. When I call Execute() on the
Send All menu item (having previously called Execute() on Tools and
Send/Receive in that order), it returns E_FAIL, and the Send All operation
is not performed.
Does anyone have an explanation for this? Is there another way? I know I
could "invoke" the Send/Receive button on the Standard toolbar, but what I
need is "send", not "send and receive".
And I am aware of Redemption::IMAPIUtils:eliverNow(), but that only works
with Exchange.
Thanks in advance!
Best,
Martynas