View Single Post
  #2  
Old December 30th 06, 03:53 PM posted to microsoft.public.outlook.program_vba
Sue Mosher [MVP-Outlook]
external usenet poster
 
Posts: 11,651
Default How to batch edit subject line of outlook emails

This is a basic text parsing exercise. For each message (objMsg), run code like this to find the break point:

If Left(objMsg.Subject, Len("[Arrow Marker")) = "[Arrow Marker" Then
intBreak = Instr(objMsg.Subject, "]")
If intBreak 0 Then
objMsg.Subject = Mid(objMsg.Subject, intBreak + 1)
End If
End If

I'd recommend using a search folder to gather all the marked items into one place for processing.

--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003
http://www.turtleflock.com/olconfig/index.htm
and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
http://www.outlookcode.com/jumpstart.aspx

"Peter Walker" wrote in message ...
Hi, I was hoping someone could help me.

I would like to batch edit a number of email folders in outlook 2007. The
current situation is that the emails in a number of my folders have common
subject lines, for example:

[Arrow Marker #1] Debian CD
[Arrow Marker #1009] subscribe posting
[Arrow Marker #137] triathlon

What I would like to get rid if is the text '[Arrow Marker #XXXX] ' from the
Subject of each email message, where XXXX is a number that might not be
unique between emails.

Is there any VB script that could do this?

Would be most grateful for any help!

Cheers,
Peter


Ads