Ok, I can already do the hard part of starting Outlook and I can even create a new messge using sendkeys "^n".
Here is the code I have used so far:
Private Sub Label380_Click()
MyAppID = Shell("C:\Program Files\Microsoft Office\Office\OFFICE11\Outlook.exe", 1)
vartimer = Timer + 4 'This part is required to let outlook open completely before the send keys command can be sent to open the new message
Do Until Timer > vartimer
Loop
AppActivate MyAppID
SendKeys "^n" 'If I add my email address to this sendkeys it doesn't do anything but open the new message window.
End Sub
Now what I can't do. For some reason I can't use Send keys to put my email address in the address field or put any other data in the new message. Can someone help me figure out why sendkeys"" doesn't allow me to fill out the email address? I am pretty sure that the problem lies in that the focus is still on the db instead of the new message when the second send keys command is sent to add my email address. I can't figure out how to make the send keys wait for the new message to be opened before continuing to send the next part. Your help is greatly appreciated if you have any experience having done this.
Tyler
Here is the code I have used so far:
Private Sub Label380_Click()
MyAppID = Shell("C:\Program Files\Microsoft Office\Office\OFFICE11\Outlook.exe", 1)
vartimer = Timer + 4 'This part is required to let outlook open completely before the send keys command can be sent to open the new message
Do Until Timer > vartimer
Loop
AppActivate MyAppID
SendKeys "^n" 'If I add my email address to this sendkeys it doesn't do anything but open the new message window.
End Sub
Now what I can't do. For some reason I can't use Send keys to put my email address in the address field or put any other data in the new message. Can someone help me figure out why sendkeys"" doesn't allow me to fill out the email address? I am pretty sure that the problem lies in that the focus is still on the db instead of the new message when the second send keys command is sent to add my email address. I can't figure out how to make the send keys wait for the new message to be opened before continuing to send the next part. Your help is greatly appreciated if you have any experience having done this.
Tyler