enderland
enderland

Reputation: 14135

Change category of incoming Outlook email with VBA

I am trying to do the following when I receive new email:

Sub CheckReadReceipt(myMail As Outlook.MailItem)

    If (myMail.ReadReceiptRequested = True) Then
        myMail.Categories = "Read Receipt Requested"
        myMail.Save
        'MsgBox "Read receipt for " & myMail.Subject & " found!"
        'eventually do something more creative..
    End If

End Sub

It doesn't save the category.

I am calling this via a rule on all incoming email (this is successfully processed by viewing the MsgBox correctly).

Upvotes: 1

Views: 393

Answers (1)

catzilla
catzilla

Reputation: 1981

I also encountered this one, this frustrated me for a while, strangely solution was to change your function call:

myMail.Save

to

myMail.Save()

I think visual basic thinks Save as a property and not a method.

Upvotes: 0

Related Questions