How to find and replace Subject line in Outlook meetings?

I have several dozen Outlook meetings that I need to change some of the words in the Subject from DocReview Reminder: to DocReview Completed:
Alex CampbellAsked:
Who is Participating?
David LeeConnect With a Mentor Commented:
Here's the code.  Follow these instructions to add it to Outlook.

1.  Start Outlook
2.  Click Tools > Macro > Visual Basic Editor
3.  If not already expanded, expand Microsoft Office Outlook Objects
4.  If not already expanded, expand Modules
5.  Select an existing module (e.g. Module1) by double-clicking on it or create a new module by right-clicking Modules and selecting Insert > Module.
6.  Copy the code from the Code Snippet box and paste it into the right-hand pane of Outlook's VB Editor window
7.  Click the diskette icon on the toolbar to save the changes
8.  Close the VB Editor

To use the code

1.  Select the folder containing the items you want to change (the code doesn't just work on calendars).
2.  Run the macro.
3.  Enter the text to search for (this is case sensitive).
4.  Enter the replacement text (this is also case sensitive).
5.  The code will run and display a dialog box at the end letting you know how many replacements it made.
Sub SearchAndReplaceSubject()
    Const MACRO_NAME = "Search and Replace Subject"
    Dim olkItem As Object, strFind As String, strReplace As String, intCount As Integer
    strFind = InputBox("Enter the text to find", MACRO_NAME)
    If strFind <> "" Then
        strReplace = InputBox("Enter the text that will replace """ & strFind & """.", MACRO_NAME)
        For Each olkItem In Application.ActiveExplorer.CurrentFolder.Items
            If InStr(1, olkItem.Subject, strFind) Then
                olkItem.Subject = Replace(olkItem.Subject, strFind, strReplace)
                intCount = intCount + 1
            End If
    End If
    Set olkItem = Nothing
    msgbox "Find: " & strFind & vbCrLf _
        & "Replace: " & strReplace & vbCrLf _
        & "The macro found and replaced " & intCount & " instances.", vbInformation + vbOKOnly, MACRO_NAME
End Sub

Open in new window

David LeeCommented:
Hi, Alex972.

There are two possible solutions.  

1.  Search for the items with the subject and when the list of matches appears open each one in turn and change the subject.
2.  Use a script that does the work for you.  

I can help with the script if you want to go that route.
Alex CampbellAuthor Commented:
I would want to use a script, but don't know how to write them.
Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

David LeeCommented:
No problem.  I do know how to write them.  I just wanted to make sure that a script was okay before taking the time to write one.  I'll get the script together and post it as soon as I can.
Alex CampbellAuthor Commented:
Thanks, that would be great.
Alex CampbellAuthor Commented:
Will try on Monday when I get back to work.  
Alex CampbellAuthor Commented:
David LeeCommented:
You're welcome.
Alex CampbellAuthor Commented:
Very useful. Thanks
David LeeCommented:
No problem.  Glad I could help.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.