I have been working on a Macro to automate emails I do (I work in technical support and a lot of the fields use the same information)..
SendKeys command works well, except I cannot move the cursor to the end of the Subject field to add information to the subject line. I have used PGDN, END and right arrow commands but none seem to work. Currently I use the code below which moves the cursor from the body (default) into the header to fill out information and then back to the body for more and then places the cursor where I would start typing a response. Works great, but would be better if I kept the contents of the subject line and just added information at the End...
If anyone who reads this has a lot of Experience with Macros and knows a better way...please add a comment...
Running this on XP Pro with Office 2003 attached to an Exchange server...
(Note...* is a character replacement to remove company identifiers)...
Public Sub AutoEmail()
SendKeys "+{Tab 5}", True
SendKeys "Tech@*******.com", True
SendKeys "{Tab}", True
SendKeys "{Tab}", True
SendKeys "{Tab}", True
SendKeys "Support_log@******.com", True
SendKeys "{Tab}", True
SendKeys "{Del 50}"
SendKeys "RE: ******* Support 21002"
SendKeys "{Tab}", True
SendKeys "{PGUP}", True
SendKeys " ", True
Selection.TypeText Text:="Hello,"
Selection.TypeParagraph
Selection.TypeText Text:="Thank you for contacting ******* Technical Support. "
Selection.TypeParagraph
Selection.TypeText Text:="If you have any further questions or issues, please reply to this email."
SendKeys "{UP}"
End Sub