Outlook focus for typing

selkov

Well-known Member
Joined
Jan 26, 2004
Messages
787
I wrote this simple script to auto populate info that i do several times a day.
When i runt he script I want to be able to add additional information on the subject line.
Right now the typing focus is after the to: email, how can i get it to be at the end of the subject line?

Sub actupd8()
'Add BCC
Dim myOlApp As Outlook.Application
Dim myItem As Outlook.MailItem
Dim objOutlookRecip As Outlook.Recipient
Set myOlApp = GetObject(, "Outlook.Application")
Set myItem = myOlApp.ActiveInspector.currentItem
With myItem
.To = "xxx.com" ' [the focus to type is here]
.CC = "xxxx.com"
.Subject = "Account Update" ' [want the focus here]


End With
SendKeys "^{ENTER}"
End Sub
 

Excel Facts

Lock one reference in a formula
Need 1 part of a formula to always point to the same range? use $ signs: $V$2:$Z$99 will always point to V2:Z99, even after copying
First, I could not get your macro to create an email for me. I use a different macro that doesn't use
myOlApp, etc.

In any case, finally located these lines of code that work for me in my macro ... see if they work for you as well.

Code:
SendKeys "^{ENTER}"
 SendKeys "{TAB}"
 SendKeys "{TAB}"
 SendKeys "{TAB}"
 SendKeys "{TAB}"
 SendKeys "{TAB}"
 SendKeys "{END}", True
 
Upvote 0

Forum statistics

Threads
1,223,893
Messages
6,175,239
Members
452,621
Latest member
Laura_PinksBTHFT

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top