Outlook Voting button

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
 
A

Andrew

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
 

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

Top