Outlook 2013 VBA extract subject and body to blank worksheet

Joined
Sep 22, 2015
Messages
2
Reaction score
1
Hi There,
I have done a bit of lookup and am working on a spreadsheet that contains company meetings details. I need the email recipient to reply to the email with either Yes or No. I have figured out how to send a row from excel via outlook and include a YES and NO button on the row that executes the code below. For the reply I want an email to be sent and I believe the code will do that, but here's what I also need. I want to populate a blank worksheet called Reply in my G:\users\MyDocuments\2015 Proxy Voting.xlsm file with the subject of the email and body in separate cells depending on the button. Cell A for subject, Cell B for YES and Cell C for NO. I will keep looking online for a solution but was hoping someone out there could help me out.

[On Error GoTo ErrHandler

Dim objOutlook As Object
Set objOutlook = CreateObject("Outlook.Application")

Dim objEmail As Object
Set objEmail = objOutlook.CreateItem(olMailItem)

With objEmail
.To = "(e-mail address removed)"
.CC = "(e-mail address removed)"
.Subject = "Altera Corp Vote Deadline 10/15/15 Vote Request Approved"
.Body = "Alter Corp Vote with Glass Leiws approved"
.Send
End With


Set objEmail = Nothing: Set objOutlook = Nothing

ErrHandler:

End Sub]
 
Back
Top