Out of office

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

This is a bit of a re-post.

Is it possible to display a form or message box when I click the OK button
on the Out of Office Assistant dialog.
 
Not that I know of, unless you hook all Windows messages to that dialog and
do it that way, using the Win32 API's. Of course you'd also have to find
that dialog when its window was opened, so that's another hook.
 
Thanks for getting back to me Ken. Can I trouble you with one more question:

Is it possible to launch the Out of Office dialog from a custom form?
--
Thanks,
MarkN


Ken Slovak - said:
Not that I know of, unless you hook all Windows messages to that dialog and
do it that way, using the Win32 API's. Of course you'd also have to find
that dialog when its window was opened, so that's another hook.
 
You can launch any dialog that's in the menus by getting the
CommandBarControl that represents that menu item and calling its Execute
method. There are code samples for doing that for various menu items at
www.outlookcode.com.

Once the dialog is opened you usually have no way of accessing it further,
influencing it or getting its return values. About all you can do once a
dialog is opened is to use something like SendKeys to send a keystroke and
hope the dialog has focus so it receives the sent keystroke, a real hack.

Other than that it's off to PostMessage and the Win32 API's.
 
Thanks again Ken,

I am an enthuastic amateur who is able to find bits of code and modifies
them to requirements, so don't worry about suggesting methods you describe as
"real hacks" as this is all I know how to do.
--
Thanks,
MarkN


Ken Slovak - said:
You can launch any dialog that's in the menus by getting the
CommandBarControl that represents that menu item and calling its Execute
method. There are code samples for doing that for various menu items at
www.outlookcode.com.

Once the dialog is opened you usually have no way of accessing it further,
influencing it or getting its return values. About all you can do once a
dialog is opened is to use something like SendKeys to send a keystroke and
hope the dialog has focus so it receives the sent keystroke, a real hack.

Other than that it's off to PostMessage and the Win32 API's.
 
Back
Top