Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 86
  • Last Modified:

Rename a PST within Outlook

Is there a program or script that can rename PST's.  When I open a PST in Outlook through File>Open>Outlook Data File... The PST opens as "Personal Folders" and of course I can go to the Properties, Advanced and rename it in the Name field but I have a few hundred I need to do and would prefer not to do this manually.
0
helpdesk_compsych
Asked:
helpdesk_compsych
2 Solutions
 
KimputerCommented:
This should help you along:

Sub test()

Dim objOutlook As Object
Dim objNameSpace As Object
    
Set objOutlook = CreateObject("Outlook.Application")
Set objNameSpace = objOutlook.GetNamespace("MAPI")
     
For Each Folder In objNameSpace.Folders
    If Folder.Name = "Personal Folders" Then
        Folder.Name = "xxx"
    End If
    
Next
 
 
 
End Sub

Open in new window


Potentially, you could open ALL pst files in a folder, and have them renamed based on the filename of the PST file.
It has to be named "Personal Folders" already though, and no other PST file should be open.
0
 
Alexei KuznetsovMicrosoft Outlook MVPCommented:
What is the rule for renaming?
0
 
QlemoBatchelor, Developer and EE Topic AdvisorCommented:
What is the reason behind opening hundreds of PST files?
0
 
helpdesk_compsychAuthor Commented:
Recovering mailbox data
0
 
QlemoBatchelor, Developer and EE Topic AdvisorCommented:
Then probably the approach by using the filename in a VBA macro is the best.
0
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.

Join & Write a Comment

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now