0

I sent an email using Outlook 2010 and after sending the email it was stored in the default Sent Items folder.

I would like to use VBA code to search for a string in the recently sent email and replace the string with a different string.

Can you suggest code that would do it?

Martijn Pieters
  • 963,270
  • 265
  • 3,804
  • 3,187
Menachem
  • 209
  • 3
  • 14
  • 1
    Find & Replace Text - `Item.Body = Replace(Item.Body, "BlaBla", "Replacement text Here")` GoodLuck – 0m3r Dec 06 '15 at 04:54
  • Thanks. How do I get to the recently sent email? This is actually what I did not know how to code correctly. – Menachem Dec 06 '15 at 05:21
  • Possible duplicate of http://stackoverflow.com/questions/34190000/replace-a-string-in-a-sent-email – niton Dec 18 '15 at 03:24
  • if the answer was helpful could you mark accept, Thanks – 0m3r Jul 13 '16 at 04:11

1 Answers1

0

GetDefaultFolder Method

myNamespace.GetDefaultFolder(olFolderSent)

Find & Replace Text -

Item.Body = Replace(Item.Body, "BlaBla", "Replacement text Here")
0m3r
  • 11,696
  • 15
  • 30
  • 65