Alternative to using SENDKEYS in Outlook 2003.

D

David

We are currently using a few sendkeys macros to do one of the following three
things.
1) type specific text inside an email message.
2) save a document in Outlook format.
3) add a reply to email address to an email.

Here are some examples of the code currently being used.
1) SendKeys "Please advise on status of order# "

2) SendKeys "%fa%too{TAB}"

3) SendKeys "%VP%A{TAB}[email protected]{ENTER}"


The reason for wanting alternatives to these are the main issue of the
NumLock and CAPSLock being turned off when either the 2 or 3 codes are run. I
also know that the sendkeys function is the worst way to get this done, but
is the only thing that is working (somewhat) for now.

Thanks for any help.

David
 
M

Michael Bauer [MVP - Outlook]

1) Add the text to a MailItem's Body property.

2) Call the MailItem's Save method, and pass the file name with the ".msg"
extension and olMSG as the second argument.

3) The MailItem has a ReplyRecipients collection. You can add the address to
that collection.

For instance, if you want to work with one opened MailItem then it's
accessable via Application.ActiveInspector.CurrentItem.

--
Viele Gruesse / Best regards
Michael Bauer - MVP Outlook
The most effective way to assign Outlook categories:
http://www.shareit.com/product.html?productid=300120654&languageid=1
(German: http://www.VBOffice.net/product.html?pub=6)

Am Tue, 6 Mar 2007 12:49:00 -0800 schrieb David:
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top