Z
Ziggy
I am trying to create a vbscript to go through users' Outlook folders and
return the paths to their PSTs.
Set myolApp = CreateObject("Outlook.Application")
Set objNS = myolApp.GetNameSpace("MAPI")
For Each objFolder in objNS.Folders
wscript.echo objFolder.Name & ": " & objFolder.FolderPath
Next
This works fine for a few of the folders (Public Folders, Mailbox, etc), but
before it hits the PSTs it errors: "Microsoft Office Outlook: The messaging
interface has returned an unknown error. If the problem persists, restart
Outlook."
Any ideas how I can get it to do all folders or even just the PSTs? Thanks!
return the paths to their PSTs.
Set myolApp = CreateObject("Outlook.Application")
Set objNS = myolApp.GetNameSpace("MAPI")
For Each objFolder in objNS.Folders
wscript.echo objFolder.Name & ": " & objFolder.FolderPath
Next
This works fine for a few of the folders (Public Folders, Mailbox, etc), but
before it hits the PSTs it errors: "Microsoft Office Outlook: The messaging
interface has returned an unknown error. If the problem persists, restart
Outlook."
Any ideas how I can get it to do all folders or even just the PSTs? Thanks!