Can not change email body content on Outlook 2010

  • Thread starter Thread starter Tom
  • Start date Start date
T

Tom

Hi,

I've VBA sub to change content for incoming email. That works fine on
Outlook 2007 but not 2010. The VBA code is:

=============================================
Sub test()
Dim ns As NameSpace
Dim Inbox As MAPIFolder
Dim Item As Object

Set ns = GetNamespace("MAPI")
Set Inbox = ns.GetDefaultFolder(olFolderInbox)

Set Item = Inbox.Items.Item(1)

Item.Body = "Test" & Item.Body
End Sub
=============================================

After running the email content in Outlook 2007 add "Test" at the beginning
of the email. But in Outlook 2010 it does nothing.

Any suggestion? Thanks in advence!

Tom
 
Back
Top