Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Outlook / Programming VBA / December 2006

Tip: Looking for answers? Try searching our database.

How to batch edit subject line of outlook emails

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Peter Walker - 30 Dec 2006 02:54 GMT
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] Re: 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
Sue Mosher [MVP-Outlook] - 30 Dec 2006 14:53 GMT
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.

Signature

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
 

> Hi, I was hoping someone could help me.
>
[quoted text clipped - 16 lines]
> Cheers,
> Peter
Peter Walker - 31 Dec 2006 01:02 GMT
Thanks Sue for the help. I'm new to Outlook programming. I better get a
reference : )

Cheers, Peter

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.

Signature

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

> Hi, I was hoping someone could help me.
>
[quoted text clipped - 17 lines]
> Cheers,
> Peter
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.