You would have to interact with the ActiveInspector property. I could never get this to work with a reply email but a fresh email is simple enough.
the following will give you "control" of the email. use myReadItem and play with it as you want.
Code:
Public Sub cbvf()
Dim myOlApp As Outlook.Application
Dim myReadItem As Object
Set myOlApp = CreateObject("Outlook.Application")
Set myReadItem = myOlApp.ActiveInspector.CurrentItem
myReadItem.Body = whatever
Isskint, thank you.
I am getting an error message:
run time error 91
object variable or with block variable not set
when this line is executed
Set myReadItem = myOlApp.ActiveInspector.CurrentItem
I am not replying to an email. I have opened a draft email and want to paste information into it
That is strange. I have just run that code and it is fine (Outlook 2007 & Outlook 2003). I assume you have a reference to Outlook library set (must have otherwise it would have tripped over on the 1st Dim line). Are you using Outlook 2010, perhaps the code is not right for it?
Isskint, thank you for checking. I was trying it with Outlook Express but I can try on another machine that has a later version of outlook, probably 2007. That my evening planned
thanks again smiler44
Isskint, thank you for checking. I was trying it with Outlook Express but I can try on another machine that has a later version of outlook, probably 2007. That my evening planned
thanks again smiler44