Solved

Rename a PST within Outlook

Posted on 2014-12-09
5
67 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 13

Expert Comment

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

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 68

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

Too many email signature changes to deal with?

Are you constantly being asked to update your organization's email signatures? Do they take up too much of your time? Wouldn't you love to be able to manage all signatures from one central location, easily design them and deploy them quickly to users. Well, you can!

Join & Write a Comment

Outlook Free & Paid Tools
Find out how to use Active Directory data for email signature management in Microsoft Exchange and Office 365.
To show how to generate a certificate request in Exchange 2013. We show this process by using the Exchange Admin Center. Log into Exchange Admin Center.:  First we need to log into the Exchange Admin Center. Navigate to the Servers >> Certificates…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …

744 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now