Solved

Rename a PST within Outlook

Posted on 2014-12-09
5
70 Views
Last Modified: 2015-07-01
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
Comment
Question by:helpdesk_compsych
5 Comments
 
LVL 35

Accepted Solution

by:
Kimputer earned 250 total points
ID: 40489242
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
 
LVL 14

Expert Comment

by:Alexei Kuznetsov
ID: 40490716
What is the rule for renaming?
0
 
LVL 69

Expert Comment

by:Qlemo
ID: 40491050
What is the reason behind opening hundreds of PST files?
0
 

Author Comment

by:helpdesk_compsych
ID: 40491562
Recovering mailbox data
0
 
LVL 69

Assisted Solution

by:Qlemo
Qlemo earned 250 total points
ID: 40491795
Then probably the approach by using the filename in a VBA macro is the best.
0

Featured Post

Does Powershell have you tied up in knots?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Is your Office 365 signature not working the way you want it to? Are signature updates taking up too much of your time? Let's run through the most common problems that an IT administrator can encounter when dealing with Office 365 email signatures.
Having trouble getting your hands on Dynamics 365 Field Service or Project Service trial? Worry No More!!!
The video tutorial explains the basics of the Exchange server Database Availability groups. The components of this video include: 1. Automatic Failover 2. Failover Clustering 3. Active Manager
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question