Can not change email body content on Outlook 2010

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
 

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