1

Outlook 2010 talking to an Exchange Server (of which I have zero ability to influence change on), so this must be a client-side solution.

Anyway, I'm looking for a way to strip "garbage" text that is always added to the bottom of message I receive from certain domains.

For example, I'll get something like this...

XXX: Sprocket, Cog [ABC] [123] [XYZ, 456]

All the stuff from the first '[' on is garbage to me and I want to get rid of it automatically on receipt by Outlook.

Any suggestions?

1 Answer 1

1

You'll probably have to create a macro that's triggered by mail coming in.

To get you started, Microsoft offers an example on catching this event in KB292063 - "How to create a custom rule using Visual Basic for Applications (VBA) in Outlook 2002" (Still applicable to OL2010).

From there you'll want to use VBScripts's RegEx (regular expressions) to do a Replace on the matching text pattern (replace the pattern with nothing/blank).

For example, using a regex search pattern of \[.+\] will find/match [ABC] [123] [XYZ, 456] in the given example string. This web-tool will help you ensure your RegEx patterns are agreeable to VB's RegEx.

If you are new to VBA macros, perhaps check out MS' "Getting Started with VBA in Outlook 2010".

If you have specific VBA programming questions as you go, check out StackOverflow.com.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .