email from excel

  • Thread starter Thread starter cape
  • Start date Start date
C

cape

I would like to have outlook open up and put the email address in the T
field. another cell into the subject and another cell into body
Without automatically sending it. I would like to highlight cell a4
(that being the email address) and then have b45 in the subject an
then c45 in the body. Help is always appreciated.
Thank
 
You will need to set a reference to the Outlook object library

Sub OutlookEmail()
Application.ScreenUpdating = False
Dim olApp As Outlook.Application
Dim olMail As MailItem
Dim s As String, st As String, str As String
With ActiveSheet
s = .Range("A45")
st = .Range("B45")
str = .Range("C45")
End With
Set olApp = New Outlook.Application
Set olMail = olApp.CreateItem(olMailItem)
With olMail
..To = s
..Subject = st
..Body = str
..Display
'or use .Send to send the email
End With
Application.ScreenUpdating = True
Set olMail = Nothing
Set olApp = Nothing
End Sub


--
XL2002
Regards

William

(e-mail address removed)

| I would like to have outlook open up and put the email address in the To
| field. another cell into the subject and another cell into body.
| Without automatically sending it. I would like to highlight cell a45
| (that being the email address) and then have b45 in the subject and
| then c45 in the body. Help is always appreciated.
| Thanks
|
|
| ---
| Message posted
|
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top