You need to call Item.Save after changing the item's content.
--
Sue Mosher, Outlook MVP
Author of Microsoft Outlook 2007 Programming:
Jumpstart for Power Users and Administrators
http://www.outlookcode.com/article.aspx?id=54
"Tom" <(E-Mail Removed)> wrote in message
news:98795E66-6DD8-410F-B4A3-(E-Mail Removed)...
> 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
>