You can try using SendKeys. However, if your macro is being fired by a
toolbar button, the cursor will have left the text area. You'd have to try
sending TAB keys to get the cursor into the proper position, and then send a
specified string to that area.
A cleaner approach would be to just write the text to the assumed area using
the Outlook Object model - the To or Body properties for example.

Signature
Eric Legault - B.A, MCP, MCSD, Outlook MVP
Job: http://www.imaginets.com
Blog: http://blogs.officezealot.com/legault
Hi Eric!
"Eric Legault [MVP - Outlook]" <elegaultZZZ@REMOVEZZZmvps.org>wrote:
> You can try using SendKeys. However, if your macro is being fired by a
> toolbar button, the cursor will have left the text area. You'd have to try
> sending TAB keys to get the cursor into the proper position, and then send a
> specified string to that area.
certainly... but I'd put it on a keyboard-shortcut
> A cleaner approach would be to just write the text to the assumed area using
> the Outlook Object model - the To or Body properties for example.
How can I access that Outlok Object Model? Is there a SDK or tutorial?
Thanks
Simon
Eric Legault [MVP - Outlook] - 27 Feb 2004 19:25 GMT
By keyboard shortcut, do you mean adding the & identifier within the toolbar
button name so that it can be activated by ALT+letter? That might be a
problem, because then that button will have focus and you may not be able to
get the focus back to the text box that requires the focus. Give it a shot
though, it might work.
If you are talking about assigning Outlook functions to a particular
keyboard stroke(s), like you can in Word - you can't do that in Outlook
unfortunately.
For best information on the Outlook Object Model, use the Object Browser in
the Outlook VBA IDE (Alt+F11, then F2), or reference the VBAOL10.chm file
(number depends on version) in your Office installation directory.
More info on Outlook VBA:
http://www.slipstick.com/dev/vb.htm
http://www.outlookcode.com/

Signature
Eric Legault - B.A, MCP, MCSD, Outlook MVP
Job: http://www.imaginets.com
Blog: http://blogs.officezealot.com/legault
> Hi Eric!
>
[quoted text clipped - 14 lines]
> Thanks
> Simon