Errors when returning Outlook folder properties

Tech-Archive recommends: Speed Up your PC by fixing your registry



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!

.



Relevant Pages

  • Re: Errors when returning Outlook folder properties
    ... At best the FolderPath for a PST file will be something like "\\Personal Folders". ... It won't be the file system path to where that PST file is stored. ... return the paths to their PSTs. ... Set myolApp = CreateObject ...
    (microsoft.public.outlook.program_vba)
  • Re: Need a better e-mail message filing system
    ... I'd reconsider archiving to PSTs. ... pure archiving, but if you still want collaboration, I'd use public folders. ... It seems clunky to me to have msg files that need Outlook to open them ... anyway - why not just leave them in Exchange and access them through Outlook ...
    (microsoft.public.windows.server.sbs)
  • Re: Outlook migration from OE
    ... where I work has one PST for each year, with folders in those PSTs ... Outlook and make it the default delivery location, ... Gb is a hard limit, ...
    (microsoft.public.outlook)
  • Re: Question about PSTs
    ... them to your default folders. ... >I had made some backups of my Contacts and Inbox folders in ... > I'm now trying to use those PSTs to recover my address book. ...
    (microsoft.public.outlook.general)
  • Re: Question about PSTs
    ... them to your default folders. ... >I had made some backups of my Contacts and Inbox folders in ... > I'm now trying to use those PSTs to recover my address book. ...
    (microsoft.public.outlook)