No problem Richard. Glad to help.
When you say "group email inbox", is this a delegated e-mail folder or a
secondary mailbox? That makes a difference in how you access the folder.
I'll assume no...
Otherwise:
Sub ReplaceSubjectTextInFolderEmails()
On Error Resume Next
Dim objNS As Outlook.NameSpace
Dim objFolder As Outlook.MAPIFolder
Dim objItem As Object
Dim strFind As String
Dim objItems As Outlook.Items
Set objNS = Application.GetNamespace("MAPI")
Set objFolder = objNS.GetDefaultFolder(olFolderInbox)
Set objFolder = objFolder.Folders.Item("Test")
If objFolder Is Nothing Then Exit Sub
strFind = InputBox("Enter the Subject text that you want to find and
remove:")
Set objItems = objFolder.Items
For Each objItem In objItems
objItem.Subject = Replace(objItem.Subject, strFind, "", , ,
vbTextCompare)
objItem.Save
Next
MsgBox "Finished.", vbOKOnly + vbInformation
Set objNS = Nothing
Set objFolder = Nothing
Set objItem = Nothing
Set objItems = Nothing
End Sub
--
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/