Set Default PST to Profile Users.

Dear.

currently, on my bussines, we need to create a new pst file, every years, cuz, where i work, we received many emails..

We know this don't is the best pratice.. to store pst on network, but, we do it..rs.

so, what i need to do is..I need to create a new pst on network, example: daniel_2015.pst, so, i need get this pst, and put default on my outlook, and put the old pst, that is like daniel_2014 only to query..and the new pst "Daniel_2015" will stay like default..

but i need do it with script, cuz we have 2000+users..and support will has a fyck work to do it in 2000 users manually.. i want help the support with it.

i know that i can remove pst with this code bellow..But i dont want remove, i want put the olds pst only to query..

On Error Resume Next
Dim objOutlook 'As Outlook.Application
Dim Stores     'As Outlook.Stores
Dim objFolder  'As Outlook.Folder
Dim i          'As Integer
 
Set objOutlook = CreateObject("Outlook.Application")
Set Stores = objOutlook.Session.Stores
  
 
For i =  Stores.Count to 0 step -1
 
If Stores(i).ExchangeStoreType = 3 Then
   Set objFolder = Stores(i).GetRootFolder
   objOutlook.Session.RemoveStore objFolder
 Else
End If
 
Next

Has any code that can put a new pst on default?

Sorry for my english, i'm brazilian,

cya.

May 3rd, 2015 3:49pm

Has any code that can put a new pst on default?

Outlook related programming questions should be posed in the following forum

Outlook for Developers
http://social.msdn.microsoft.com/Forums/en-US/outlookdev

Free Windows Admin Tool Kit Click here and download it now
May 3rd, 2015 7:26pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics