Hi I have a problem with autonaming Archivenames within Ouotlook GUI
I have as follow a vbscript that copy template.pst file to a specific folder with the date set of creation
c:\script\template.pst is copied to a folder and renamed to c:\scripts\backup\Archive\20081024archive.pst
( i will later redirect this to the users homefolder, but for now when testing i use this path)
I also have code that automounts this file in Outlook, but i dont know how i rename this namespace in outlook. As it is
now it gets the default name from the template. which means that i get several pst files kalled archive within outlook.
I would like to have them called 20090519archive, (by date of creation).
Anyone know how to accomplish this?Below is the vbscript i use, and it works except that the last thing i need is the autonaming in outlook!
if intNumber <= 9 Then
padDate = "0" & CStr(intNumber)
padDate = CStr(intNumber)
Set objFSO = CreateObject("Scripting.FileSystemObject")
strDate = Year(Date) & padDate(Month(Date)) & padDate(Day(Date))
objFSO.CopyFile "C:\scripts\template.pst" , "c:\scripts\backup\" & strdate & "archive.pst" (this line creates the file 20090519archive.pst)
objFSO.CopyFile "C:\scripts\backup\" & strdate & "archive.pst" , "C:\scripts\archive\" & strdate & "archive.pst" (this line copies the 20090519archive.pst to alternate location)
Set objApp = CreateObject("Outlook.Application")
Set objNameSpace = objApp.GetNameSpace("MAPI")
objNameSPace.AddStore "C:\scripts\archive\" & strdate & "archive.pst"
Thanks for any help with this!