Outlook Voting button

  • Thread starter Thread starter Andrew
  • Start date Start date
A

Andrew

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.


TIA
Andrew Sbrana
Senior Business Analyst
 
I've found the answer to my question. Voting buttons are created in an
email by using .votingoptions as MailItem object.

Sub Create_Email()

Dim oOutlook As Object
Dim oMailItem As Object
Dim oRecipient As Object
Dim oNameSpace As Object

' Create the email

Set oOutlook = CreateObject("Outlook.Application")
Set oNameSpace = oOutlook.GetNameSpace("MAPI")
oNameSpace.Logon , , True

Set oMailItem = oOutlook.CreateItem(0)
With oMailItem
Set oRecipient = .Recipients.Add(FCell)
oRecipient.Type = 1 '1 = To, 2 = CC
.Subject = "This is to test Voting Buttons"
.body = "This is an email macro test"
.Categories = "Macro Testing"
.votingoptions = "Yes;No;Put text here"
.display
.send
End With

End Sub
 
Back
Top