T
tobias.vilen
Hi,
I am adding a PST-file with the following code;
Dim PSTFileName, Application, objName, PSTFile, fso
pstFileName = "%s"
Set Application = CreateObject("Outlook.Application")
Set objName = Application.GetNamespace("MAPI")
Set fso = CreateObject("Scripting.FileSystemObject")
Set PSTFile = fso.GetFile(pstFileName)
' Second argument is Type (1=Default,2=Unicode,3=Ansi)
objName.AddStoreEx PSTFile, %d
if Err <> 0 Then
WScript.StdOut.WriteLine "Success=F"
WScript.StdErr.WriteLine "ErrorNumber=" & Err.Number
WScript.StdErr.WriteLine "ErrorDescription=" & Err.Description
WScript.StdErr.WriteLine "ErrorSource=" & Err.Source
WScript.Quit 1
else
WScript.StdOut.WriteLine "Success=T"
WScript.Quit 0
End if
%s is the file system path to the file.
If I previously have defined a Display Name for my PST-file in outlook
it seems as that display name is replaced with the default "Personal
Folders" when viewing the file opened with the above code in Outlook.
Am I doing something wrong somewhere, or is this the default behaviour
for AddStoreEx?
Best Regards
Tobias
I am adding a PST-file with the following code;
Dim PSTFileName, Application, objName, PSTFile, fso
pstFileName = "%s"
Set Application = CreateObject("Outlook.Application")
Set objName = Application.GetNamespace("MAPI")
Set fso = CreateObject("Scripting.FileSystemObject")
Set PSTFile = fso.GetFile(pstFileName)
' Second argument is Type (1=Default,2=Unicode,3=Ansi)
objName.AddStoreEx PSTFile, %d
if Err <> 0 Then
WScript.StdOut.WriteLine "Success=F"
WScript.StdErr.WriteLine "ErrorNumber=" & Err.Number
WScript.StdErr.WriteLine "ErrorDescription=" & Err.Description
WScript.StdErr.WriteLine "ErrorSource=" & Err.Source
WScript.Quit 1
else
WScript.StdOut.WriteLine "Success=T"
WScript.Quit 0
End if
%s is the file system path to the file.
If I previously have defined a Display Name for my PST-file in outlook
it seems as that display name is replaced with the default "Personal
Folders" when viewing the file opened with the above code in Outlook.
Am I doing something wrong somewhere, or is this the default behaviour
for AddStoreEx?
Best Regards
Tobias