Copying from PST into Outlook 2010 creates items with “Copy:” prefixed on them

Microsoft Windows

What a pain to have this happen, however once you’ve imported from PST you can run the following script from within Outlook 2010. In this example it changes the items in the “Calendar” folder under Outlook.

From the Outlook 2010 client do this:

  1. Press Alt+F11 which will open the VBA window. 
  2. In the left pane, navigate to Project1-MS Outlook Object and double-click ‘ThisOutlookSession’.
  3. Paste the code into the window in the right pane.
  4. Press the green arrow button to execute the code.

Code to paste in:

Sub FixCopy()
Dim calendar As MAPIFolder
Dim calItem As Object
Set calendar = Application.GetNamespace("MAPI").GetDefaultFolder(olFolderCalendar)
Dim iItemsUpdated As Integer
Dim strTemp As String
iItemsUpdated = 0
For Each calItem In calendar.Items
    If Mid(calItem.Subject, 1, 6) = "Copy: " Then
      strTemp = Mid(calItem.Subject, 7, Len(calItem.Subject) - 6)
      calItem.Subject = strTemp
      iItemsUpdated = iItemsUpdated + 1
    End If
Next calItem
MsgBox iItemsUpdated & " of " & calendar.Items.count & " Items Updated"
End Sub

This has been helped by the post:

Leave a Reply

Your email address will not be published.