Email:      Pass:    Pass?
Close Window   
Subscribe for Email Updates!
Excel tips, help, and more!


Free Excel Forum

Outlook Voting Button

Forum Register
Search Excel Forum Posts, Tutorials, Macros, Tips, and More

To whom it may concern,

How do I include "Voting Buttons" in an Outlook email message using a macro
from Excel 2003? I have tried adding them as objects within the email
portion of the macro code, but have not been successful. Any help would be
greatly appreciated.

Andrew Sbrana
Senior Business Analyst

Similar Excel Video Tutorials

Helpful Excel Macros

Email Current Workbook & or Other Attachments
- This macro will send the current workbook in an email through Microsoft Outlook. The Macro allows you to send the most
Send Emails through Outlook using Email Addresses from Excel and text from Word
- This macro allows you to send an email to a list of recipients through excel. The email will be sent through Outlook an
Open Microsoft Outlook from Excel
- This free macro will open the Microsoft Outlook program on your computer. You do need to have this program first. This
Display The Actual Link / Email Address From Links in Excel - UDF
- Display the actual link or email address from links within Excel with this UDF. This user defined function pulls the ac
Complete Guide to Printing in Excel Macros - PrintOut Method in Excel
- This free Excel macro illustrates all of the possible parameters and arguments that you can include in the PrintOut Meth

Similar Topics

Hi All,

I've got the below code that sends an E-mail from outlook via VBA coding in a macro, I would like someone to help me add into the code the following;

Custom Voting Buttons: Approve; Reject; Hold ECS
Redirect replies to another E-mail address.


Dim Email_Subject, Email_Send_To, Email_Cc, Email_Bcc, Email_Body As String 
Dim Mail_Object, Mail_Single As Variant 
Email_Subject = "Automatic Message: Re-sale Register" 
Email_Send_To = "[EMAIL=""][/EMAIL]" 
Email_Bcc = "[EMAIL=""][/EMAIL]" 
Email_Body = "New comments have been added to a part you've subscribed to" 
On Error Goto debugs 
Set Mail_Object = CreateObject("Outlook.Application") 
Set Mail_Single = Mail_Object.CreateItem(0) 
With Mail_Single 
    .Subject = Email_Subject 
    .To = Email_Send_To 
    .BCC = Email_Bcc 
    .Body = Email_Body 
End With 
If Err.Description <> "" Then MsgBox Err.Description 

If you like these VB formatting tags please consider sponsoring me in support of injured Royal Marines

I know the following question is not to do with Excel but it's related and I need to re-think how to do the above if this isn't possible:
Is it possible to have an E-mail address in outlook look at all incoming E-mails and change a spreadsheet depending on what the E-mail says?

I know theres a few complex questions, feel free to ask more.


Hi. I'm trying to send an email to several hundred people using an excel database containing the email address and a customer reference number. I want the email to have a subject line containing the reference number. Can anyone help me with this?

What's more I need the email body to contain some static text, BUT for the recipient to reply to a fixed email address using voting buttons. I thought maybe replacing the voting buttons with maybe a mailto hyperlink which populates the reply subject with the vote option and the reference number.

Any help you can give would be greatly appreciated.

Many thanks,

I have created a macro which sends an email out with voting buttons Approve and Reject.
Problem is, when the receiver of the email hits Approve, it only gets send to the sender of the origin email (user of the program). I wanted it set up so that when the receiver hits Approve,it gets sent to the user of the program as well as me. I tried putting both names in the TO field but the response only gets sent to the user of my application that sent the email out. Is there any way to get around this?

HI please can you help. I am not good with code and was wondering if the following is possible.

I have managed to pull together a code, which is probably not the best of code and a mixture of all different things but seems to work so far. It currently emails an attachment to a supervisor email address and cc's. to an administrator email address. The email generated also has the voting buttons included however, When you use the voting option to reply it is only sent to the person who it, is there a way of also replying to the administrator cc email address?

I hope the above make sense


I'd like a button on the toolbar of a new Outlook 2003 message that does a
few things .

First it checks two options under "Voting and Tracking options" under
"Message Options", "Request a delivery receipt...." and "Request a read
receipt..."for this specific message.

Then i'd like for the macro/vba to attach the following file "C:\FTPLOG\ftp.log"

Then I would like for it to automatically "Send" the message.

Lastly, I would like for it to delete the file it just sent
"C:\FTPLOG\ftp.log", to be ready for the next transmission.

Where do i even start to get this going?

Please help...thanks in advance,

hi all, not sure if this is vba, but is there a way using outlook on a network that i can schedule a meeting in calendar from responses to yes no maybe voting buttons in an email, as always thanks in advance


I've had assistance in creating pdf's in Excel 2003 using VBA. The macro creates pdf's for all sheets (from sheet 4 onwards) and saves them as follows: c:\temp\"sheet name".pdf

I would also like to e-mail the created pdf every time using Outlook 2003. This will be e-mailed to different e-mail addresses using the macro. I will put the email address somewhere on the relevant sheet (e.g. cell A1).

I attach an example spreadsheet including the current code creating the pdf's.

I have also noted that Outlook 2003 automatically gives a security warning because "another program is trying to access Outlook". Is it possible to have the macro "delete" or "ignore" this message automatically?

Thank you!

hi everyone,

What i need to do is fairly simple but i can't manage to do it...

What i need is a Macro that can do the following:

i want a serie of button called "coaching" on row h4 to h1000, all the button are identical and do the same purpose.

When we click on the button i want the name to change from "coaching" to "email sent", and i want outlook to open with a email adress in the "to" field, and want the subject of the email to be "agent that need coaching".

So each time i fill a row, if i need a coaching to be done, i click the coaching button and it open up outlook with a "to" and a "subject", and i can then, manually finish the email.

So a quick resume:
series of button that fit individually in cell h4 to h1000, called coaching
when i click it change to email sent
And open outlook with a "to" email and "subject" prefilled.

Anyone can help?

I have an Excel macro that sends an Outlook message with an attachment. The code works perfectly, but the request to send the email does result in the message: "A program is trying to send email on your behalf...".

I found a similar problem noted he

One of the three solutions offered was to sign one's macros. I've done that (internal digital certificate) and have configured both Excel and Outlook to "honor" this signed macro by having them listed under Tools, Macro, Security/Trusted Publishers.

I still get the message about the email. I tried this under both High and Medium level security.

Our IT infrastructure guys tell me that there is nothing that they have in place that would cause this to occur.

Does anyone know why this is occurring? I'm running Outlook 2003 SP3 and Excel 2003 SP3.


I have added voting buttons to the following macro, is there anyway og getting the voting buttons to reply to multiple recipients or in the case "email1"

Sub Button12_Click()
Dim myOutlook As Object
Dim myMailItem As Object
Set otlapp = CreateObject("Outlook.Application")
Set otlNewMail = otlapp.Createitem(olMailItem)
fname = ActiveWorkbook.Path & "\" & ActiveWorkbook.Name
Email1 = Cells(10, 2).Value
requistioner = Cells(4, 2).Value

With otlNewMail
.To = " "
.CC = Email1
.Subject = " "
.Body = Chr(13) & "Hi," & Chr(13) & Chr(13) & "Please process the attached order at your earliest convenience" & Chr(13) & Chr(13) & "Regards," & Chr(13) & requistioner & Chr(13) & Chr(13)
.VotingOptions = "Accept;Reject"
.Attachments.Add fname
End With
End Sub

I have an excel workbook that I must email out to my team on a daily basis. The excel workbook needs to be refreshed daily from two text files that are downloaded from our wms system. The text files are imported to the excel workbook and the workbook is emailed to the team. I am trying to automate this so I do not have to open the excel workbook, click data, refresh all, choose the files to refresh, click the office button, click send, as email attachment, type in the email address and click send.

I did come across the following VB code that is very helpful to me although I have one concern. The concern is that when this workbook is emailed out to the team and they open it, I think the macro will run and import the data and email the workbook again. I can see some people opening the emails continuously and creating a repetitive loop that can be very frustrating to others on the email chain.

Is there a way to have the VB code do everything but only on my side and not run the VB macro when the email is sent?

Sub Auto_Open()
' Auto_Open Macro
' refresh data and send email


' Works in Excel 2000, Excel 2002, Excel 2003, Excel 2007, Excel 2010, Outlook 2000, Outlook 2002, Outlook 2003, Outlook 2007, Outlook 2010.
' This example sends the last saved version of the Activeworkbook object .
Dim OutApp As Object
Dim OutMail As Object

Set OutApp = CreateObject("Outlook.Application")
Set OutMail = OutApp.CreateItem(0)

On Error Resume Next
' Change the mail address and subject in the macro before you run it.
With OutMail
.To = "enter email address"
.CC = ""
.BCC = ""
.Subject = "Daily Report"
.Body = "Attached is the daily report."
.Attachments.Add ActiveWorkbook.FullName
' You can add other files by uncommenting the following line.
'.Attachments.Add ("C:\test.txt")
' In place of the following statement, you can use ".Display" to
' display the mail.
End With
On Error GoTo 0

Set OutMail = Nothing
Set OutApp = Nothing

ActiveWorkbook.Close True

End Sub

I'm using a standard little Excel macro to send an individual email to each person in a list:


With ActiveSheet
    Msg = "All," & Chr(10) & Chr(10) & "As part of normal support and maintenance, this week we updated your store to v" & .[X1] & Chr(10) & Chr(10) & "Any questions please contact me directly."
    Set Emails = .Range("T2", .Range("T" & .Rows.Count).End(xlUp)).SpecialCells(xlFormulas, 2)
    For Each Email In Emails
        Set OutApp = CreateObject("Outlook.Application")
        Set OutMail = OutApp.CreateItem(0)

        Subject = Email.Offset(, -19) & " - System Update"
        With OutMail
            .To = Email.Text
            .CC = ""
            .BCC = ""
            .Subject = Subject
            .Body = Msg & Chr(10) & Chr(10) & Signature
            '.Display   'or use .Send
        End With
        Email.Offset(, -1) = "Done"
    Next Email
End With

Problem, I'd like to set the "Save Sent Message To:" option on each of these emails, too, to file this email into a specific archival folder in Outlook. Is there a way to do this in Excel VBA? I could just copy all these emails manually out of the SENT EMAILS folder, but if it's possible to file them using the macro, even better.

Bonus question: Is there any way to add an existing Signature in Outlook to these emails? I have a default signature that occurs automatically on all NEW emails I create in Outlook, but this VBA method of creating an email does not get that default signature, seems to skip that. In the code above I'm using another signature I created for the macro, but it's not the cool formatted signature I have usually in Outlook.

(also posted here with no response so far...)

I have a macro that sends a worksheet via email [Outlook] to a list of recipients. Everytime an email is created, outlook pops up a confirmation window and waits for user input "yes".

Can I set up vba or outlook to skip that step?

I really want to create a macro with a loop to go through a list of files, execute a macro in each one, save the files and send emails to various people. This process will create about 40 emails and I don'd want the admin person to have to sit there and confirm each message going out.

Any help would be apprecited.

Excel Gurus,

I am using outlook 2003, and currently I am trying to run this email macro on my excel and send an excel file to specific email. And when i execute the code, Mic. outlook popup a window saying
"A program is trying to access e-mail address stored in outlook. Do you want to allow this? then i have to check the allow access box and select the minutes. Is there anyway I can bypass this or automate this in the macro?

Thanks for all the help.

Hi Guys,

I have a spreadsheet with a number of different actions with various different dates associated to them. Is it possible to create a macro that will automatically send an email to my outlook inbox (or somebody elses) when the date is due or upcoming?

Also is it possible to include different content in the email based on say the title of the action etc?

Any help would be greatly appreciated, thanks in advance

Hi All,

I have had great help on this site getting code working to send contents of Excel via Outlook. Now I have had a request to make this work via MAC too< i don't have a MAC and know nothing about them. :-(
(Please note I have no experience in code, everything I have picked up from help on this site and generally it is a copy and paste exercise rather than an understanding)

To give as much info as possible.

At the moment I have a excel sheet with 5 buttons, you click the button and a macro is run to populate the required fields to be completed for that button. There is then a EMAIL button which is clicked to copy and paste the contents from the Excel spreadsheet into Excel, everything is working great for this for Outlook (all thanks to help from this site and a couple of other websites I have been pointed to)

Now I need to get this working for MAC. I have been pointed to a site but I really can't work things out. What I need to know is.

A. How do I change the code below to work for MAC.
B. How will I identify if a MAC or Outlook user? Would I need two buttons ;CLICK HERE TO EMAIL ON MACS' AND 'CLICK HERE TO EMAIL ON OUTLOOK' or is there something more clever than this.

Any help really appreciated.

Attached spreadsheet containing the full code used at the moment to email the contents. (The code behind the click here to email button)

Just wondering if somone could help me with some VBA. I have written a macro so when I press a button, it creates an email with the email addresses, relevant attachment and text in the body of the email.

However, I also want to add data from one tab called 'stats' (A5:A8 to be precise) below my first line of the body of the message. Can anybody help. My exisiting code is below:

Sub Mail_workbook_Outlook()
Dim OutApp As Outlook.Application
Dim OutMail As Outlook.MailItem
Set OutApp = CreateObject("Outlook.Application")
Set OutMail = OutApp.CreateItem(olMailItem)
With OutMail
.To = ""
.CC = ""
.BCC = ""
.Subject = "Hello"
Dim strbody As String
strbody = "Please find attached today's spreadsheet and statistics below." & vbNewLine & vbNewLine & _
"Kind regards" & vbNewLine & _
.Attachments.Add ("C:\desktop\name.pdf")
End With
Set OutMail = Nothing
Set OutApp = Nothing
End Sub

I'm looking for a sample of code to open an excel file attached to an outlook message.

1) Preferably, from the selected email in my inbox
2) Also good, from the current open message
3) Best, to loop through all emails in a specific outlook folder and either open the files or save them to a specific directory.

Thanks if anyone has suggestions - my attempts at working with outlook objects hasn't proved too successful yet.


I currently use the following code to open any of my 4 types of email accounts, such as hotmail, gmail, juno etc. Now I am adding Outlook and I don't know how to incorporate it into my code.

As an Ex: I have a seperate worksheet that I place the name and the following code will open it. I use a separte cell for each email address along with a separate macro for each email name.

I doubt that I can use this same code. I think that I have to use Outlook.exe ?????

Help would be appreciated.


Sub OpenMyeMailNo2()
Dim oShell
Dim sUrl As String
 sUrl = "http://" & Sheets("Setup").Cells(9, 5).Value
    Set oShell = CreateObject("Wscript.Shell")

    oShell.Run (sUrl)
End Sub

The first two parts of this macro work just fine, it's the closing part of it which doesn't work. The strange thing is, if I isolate the close part of the macro and run it as it's own macro, it will work. However, it will not work as part of a larger macro, or even if called from a higher macro which contained the open portion. Here is my code:


Sub launch_send_close_outlook()

'launch Outlook
Dim Outlook As Outlook.Application
Set Outlook = CreateObject("Outlook.Application")
Dim ns As Outlook.Namespace
Dim Folder As Outlook.MAPIFolder
Set ns = Outlook.GetNamespace("MAPI")
Set Folder = ns.GetDefaultFolder(olFolderInbox)
Outlook.Explorers.Add Folder
    'send email
    Set myOlApp = CreateObject("Outlook.Application")
    Set mailItem = myOlApp.CreateItem(olMailItem)
    Set myRecipient = mailItem.Recipients.Add("")
    mailItem.body = "testing"
    mailItem.Subject = "test email"

'close Outlook
Set Outlook = CreateObject("Outlook.Application")
Set Outlook = Nothing

End Sub

If anyone can explain what I'm doing wrong with the last part, I would appreciate it. Also, if any other part of my code could use some cleaning up, feel free to let me know.


Is there any way of getting the voting buttons in Outlook to automatically reply to multiple recipients


I received a request for a macro that, on pondering over later, I realised was a little naive and possibly superfluous as well. However, here goes.

On the Compose Messages window, in addition to the "Send" button that Outlook provides, I need another button that, when clicked, will perform the same function as the default "Send" button, but will also add the text "Follow-up" to the subject line and forward the email to a specific email address. I also need to have a way of changing the email address when I want to, and have Outlook remember the address every time I close and open it.

Any help on this would be appreciated.


Please help!!

I have a macro that will send the active spreadsheet and also a specified file as an attachment in an email using Outlook, but I want to be able to choose the email address rather than specifiying one in the macro. Here's my code:

Sub Macro4()
Dim aOutlook As Outlook.Application, aEmail As Outlook.MailItem
Set aOutlook = GetObject(, "Outlook.Application")
If aOutlook Is Nothing Then Set aOutlook = New Outlook.Application
Set aEmail = aOutlook.CreateItem(olmailitem)
aEmail.Subject = "I/E Report"
aEmail.Body = "The report that you requested is attached."
aEmail.Recipients.Add ""
aEmail.Attachments.Add "C:\My Documents\CURRENTGL.XLS"
aEmail.Attachments.Add ActiveWorkbook.FullName
End Sub

Any suggestions would be greatly appreciated. I have just started working with VBA.
Thanks, Shannon

I imported some business card info into Outlook 2003 in the following way.

First I imported the data into Access. (I created the access file format by doing an EXPORT from Outlook to Access, so the file format would be recognizable to Outlook).

I then input the contact data from the Access table into Outlook. It worked beautifully.

One glitch !! When creating an email to one of these contacts, the recipient address displays in the top of the new mail message as follows:

Elizabeth M Jensen LSW (Business Fax)

This is true for all these contacts.

I do not know why "Business fax " appears. How do I fix this?

The field "Phone 3 selector" does contain the text "Business fax", but I did not populate that field.

Many thanks for any assistance.


I'm putting this in the Excel section, but what I want to do is have one of my Excel macros run upon receipt of an automated email in my Outlook inbox. I setup a rule to monitor my Outlook mail looking for this specific email message. Right now it displays a message box to alert me when the message has arrived. Does anyone have an example of how I can modify the code and have it automatically run a macro from one of my Excel files?