Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Creating a mail with Voting Buttons - Outlook with VBA

Status
Not open for further replies.

outofmemoryerror

Programmer
Nov 12, 2005
3
GB
Hello,

My company has a custom tool which we use to create customized emails. A user selects from a toolbar a number of options, and an email is created with a set subject, recipients, body etc.

I've been asked to configure an email so that it is created with two voting buttons which recipients can use to respond to it.

Does anyone know how i programmatically add voting buttons to an email? (i need to be able to perform by code what i can do manually by selecting "options" and ticking the voting buttons option, and configuring it).

Here's the kind of code already in use to create the mail:

Set myitem = Application.CreateItem(0)
myitem.Subject = subjectvar
myitem.To = tovar
myitem.display


Is there perhaps some kind of myitem.votingbuttons??

Thanks in advance for any assistance.
 
outofmemoryerror,

Try this
Code:
Sub Mail_Item_with_Voting_Buttons()
    Set myOlApp = CreateObject("Outlook.Application")
    Set myItem = myOlApp.CreateItem(olMailItem)
    myItem.VotingOptions = "Yes;No"
    myItem.Display

End Sub

All you would need to do is replace the "Yes;No" string with whatever semi colon delimitted string you want. Upon sending the message the recipients will see the voting buttons.



Thanks and best regards,
-Lloyd
 
Apologies for taking so long to get back on this, but this was exactly the solution i was looking for.

Thank you so much!

Regards,

Mark
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top