Solved

Rename a PST within Outlook

Posted on 2014-12-09
5
78 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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 (Outlook MVP)
ID: 40490716
What is the rule for renaming?
0
 
LVL 70

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 70

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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

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.

Question has a verified solution.

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

Read this checklist to learn more about the 15 things you should never include in an email signature.
When you have clients or friends from around the world, it becomes a challenge to arrange a meeting or effectively manage your time. This is where Outlook's capability to show 2 time zones in one calendar comes in handy.
The viewer will learn how to simulate a series of coin tosses with the rand() function and learn how to make these “tosses” depend on a predetermined probability. Flipping Coins in Excel: Enter =RAND() into cell A2: Recalculate the random variable…
This video demonstrates how to sync Microsoft Exchange Public Folders with smartphones using CodeTwo Exchange Sync and Exchange ActiveSync. To learn more about CodeTwo Exchange Sync and download the free trial, go to: http://www.codetwo.com/excha…

738 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