Send mail with outlook message options-voting importance

J

JC

Ron's Code is greaqt --new at programming excel.
The code you give in MSN for send mail is great I need to automate
one more option from outlook, the voting options

Want to add automatic message options option to Ron's code

Example:
If IsNull(Vote) = False Then
.VotingOptions = Vote
End If

Select Case Urgency
Case 2
.Importance = olImportanceHigh
Case 0
.Importance = olImportanceLow
Case Else
.Importance = olImportanceNormal
End Select

but this is not working in excel.
 
R

Ron de Bruin

Hi JC

Do you use Late or Early binding

Do you have the Importance code working ?
 
R

Ron de Bruin

Try this one JC

Sub Mail_small_Text_Outlook()
' Is working in Office 2000-2007
Dim OutApp As Object
Dim OutMail As Object
Dim strbody As String

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

strbody = "Hi there" & vbNewLine & vbNewLine & _
"This is line 1" & vbNewLine & _
"This is line 2" & vbNewLine & _
"This is line 3" & vbNewLine & _
"This is line 4"

On Error Resume Next
With OutMail
.To = "(e-mail address removed)"
.CC = ""
.BCC = ""
.Subject = "This is the Subject line"
.Body = strbody
' 0 = Low, 2 = High, 1 = Normal
.Importance = 2
.VotingOptions = "Approved;Disapproved"
.Send 'or use .Display
End With
On Error GoTo 0

Set OutMail = Nothing
Set OutApp = Nothing
End Sub
 
J

JC

Works great. Thank you
How about the Delivery option? to return responses to group mailbox
and how do I set the send response option with
EDIT THE RESPONSE before sending option
with orig message included in the response
 

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