Act on Outlook mail item when opened for editing

83 views Asked by At

What I'd like to do is act on a message as soon as it is opened in an edit window.

As an example, if I forward or reply to a message, I'd like to automatically save a draft using VBA as soon as the message loads into the edit window, simulating hitting the "Save" button or the Ctrl-S combo.

Thanks for the help.

(I'm somewhat familiar with application events such as ItemSend for the purpose of automatically running vba code, but am still pretty much a newbie)

1

There are 1 answers

2
Eugene Astafiev On

You can handle the NewInspector of the Inspectors class which is fired whenever a new inspector window is opened, either as a result of user action or through program code or the Activate event of the Inspector class which is fired when an inspector becomes the active window, either as a result of user action or through program code.