I'm trying to automate sending an email, this code works every other time it
runs. When it doesn't work, the first send keys enters the email address
into the message title instead. Any ideas?
Thanks, Dennis
Public Sub subMailer()
Shell "c:\program files\microsoft office\office\outlook.exe /c ipm.note"
'opens a new message
AppActivate "untitled", True 'activates the message
SendKeys "{tab 2}", True 'tabs to the title
SendKeys "test email", True 'enters the title
SendKeys "%(s)", True 'set focus at send
SendKeys "~" 'sends the mail
End Sub