Another Outlook redemption question/problem

  • Thread starter Thread starter George Sambataro
  • Start date Start date
G

George Sambataro

Dmitry.. I sent you an email but since I know you hang out here and also
someone else might have a solution to this problem



I am testing my redemption logic on a new PC with MS Office Outlook 2003
(11.5608.5606).



Everything works fine except for the "trick" you suggested using the btn
command to force a send /receive (see code below)



Set explorer = ol.ActiveExplorer

Set btn = explorer.CommandBars.FindControl(1, 5488)

btn.Execute ' error occuring here with new outlook 2003



The btn.execute causes a VB error " Object variable or with block variable
not set" . Yes,, Outlook is OPEN when this command is executed.



Since it works on Outlook 2000, I am guessing that some thing has changed
with Outlook 2003 making the btn command invalid.. or at least different



Any suggestions?



Thanks,



George
 
This happens because in Outlook 2003 the Send/Receive button is actually a
dropdown, not a button. You need to call FindControl() with a different
command id - click Explorer in OutlookSpy, go to the CommandBars tab and
find the suitable button - I don't have Outlook 2003 handy at the moment.

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
 
Thanks... I figured it was something like this. Outlook spy is very cool.

George
 
Back
Top