PC Review


Reply
Thread Tools Rate Thread

Code to amend subject lines in a public outlook folder ...

 
 
Rob Keel
Guest
Posts: n/a
 
      29th Sep 2005
Hi,

Can anyone offer a solution to add a defined number of characters to
all email subject fields stored in a public outlook folder please?

ie ... i have a folder full of emails that begin with a number. From
day 1 (due to no forward planning) the subject line of the first email
stored began with "1 XXXXXXXXXXX" ... now 6 months later we are up to
12000 odd and to aid sorting I would like to add "0000" to the
beginning of all subject fields. So 1<space><space>XXXXXXXX becomes
"00001 XXXXXXXXXXX"

Many thanks,

Rob.

 
Reply With Quote
 
 
 
 
=?Utf-8?B?RXJpYyBMZWdhdWx0IFtNVlAgLSBPdXRsb29rXQ==
Guest
Posts: n/a
 
      5th Oct 2005
This should do it (run with the folder containing the items active in Outlook):

Dim objFolder As Outlook.MAPIFolder
Dim objItems As Outlook.Items
Dim objItem As Outlook.MailItem

'Work with the current folder only
Set objFolder = ActiveExplorer.CurrentFolder
Set objItems = objFolder.Items
For Each objItem In objItems
objItem.Subject = "0000" & objItem.Subject
objItem.Save
Next

Set objItem = Nothing
Set objItems = Nothing
Set objFolder = Nothing

--
Eric Legault (Outlook MVP, MCDBA, old school WOSA MCSD, B.A.)
Try Picture Attachments Wizard for Outlook:
http://www.collaborativeinnovations.ca
Blog: http://blogs.officezealot.com/legault/


"Rob Keel" wrote:

> Hi,
>
> Can anyone offer a solution to add a defined number of characters to
> all email subject fields stored in a public outlook folder please?
>
> ie ... i have a folder full of emails that begin with a number. From
> day 1 (due to no forward planning) the subject line of the first email
> stored began with "1 XXXXXXXXXXX" ... now 6 months later we are up to
> 12000 odd and to aid sorting I would like to add "0000" to the
> beginning of all subject fields. So 1<space><space>XXXXXXXX becomes
> "00001 XXXXXXXXXXX"
>
> Many thanks,
>
> Rob.
>
>

 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Outlook 03 change/amend subject title before saving to personal fo =?Utf-8?B?U3RldmUgQmVsbA==?= Microsoft Outlook Discussion 1 1st Mar 2007 01:17 PM
Can I wildcard a subject for a public folder rule? =?Utf-8?B?Q3VycnlE?= Microsoft Outlook Discussion 0 31st Mar 2006 03:28 PM
Any way to color code subject lines? Bill Microsoft Outlook 2 23rd May 2005 03:33 PM
How do I amend the City Code (Contacts) in Outlook =?Utf-8?B?b3JmZXVzMTY5?= Microsoft Outlook Contacts 0 17th Apr 2005 05:03 AM
Help on writing a code to copy and amend lines Karen Brown Microsoft Excel Programming 2 5th Feb 2004 05:51 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 09:12 PM.