First, this is a redundant line of code that you should delete from my
previous post:
Set objReviseContents =
objCommandBar.FindControl(MsoControlType.msoControlButton, 3273)
I tried executing this button in the Item_Open and Inspector_Activate
events, and it looks like toolbar buttons cannot be executed programmatically
until after the form has completely loaded, which it won't be until after the
Item_Open/Inspector_Activate event. Makes sense, and truthfully I've never
tried executing toolbars in this context before so this is good to know!
The only other option I can think of is to use a Timer control on a custom
form (or Win32 API timer events) that will execute and fire the Revise
Contents button a few seconds after the form loads.
--
Eric Legault - B.A, MCP, MCSD, Outlook MVP
--------------------------------------------------
{Private e-mails ignored}
Job: http://www.imaginets.com
Blog: http://blogs.officezealot.com/legault/
> With this code the object 'objReviseContents' will be created, but
> objReviseContents.Execute has no effect in the Item_Open Event. If I
[quoted text clipped - 27 lines]
> > Set objCommandBars = Nothing
> > Set objReviseContents = Nothing
Urs Ruefenacht - 04 Mar 2005 08:27 GMT
Thanks - good idea with the timer. I don't have tried it yet.
Is there possibility to enable 'Revise Contents' globally or for a
single (custom) form in the outlook options or registry? In Outlook 2000
I don't have to revise contents for editing a reopened form.
Eric Legault [MVP - Outlook] schrieb:
> First, this is a redundant line of code that you should delete from my
> previous post:
[quoted text clipped - 18 lines]
> Job: http://www.imaginets.com
> Blog: http://blogs.officezealot.com/legault/