Create a store and assign it a name (Outlook)

Hello world!
I would like to know how to create a store in C# and assign it a name other than Personal Folders. I try this:
this.Session.AddStore("c:\\test.pst");

Now I need to change it name. Thank you very much!


Answer this question

Create a store and assign it a name (Outlook)

  • PhilipD

    You need to add the store, give it a name, then remove it and add it again to refresh the folder list display. You should be able to adapt the VBA sample code from http://www.outlookcode.com/codedetail.aspx id=962
  • Lyk

    Hi,

    You can specify the name of the new store instead of the store path:

    e.g.:

    this.Sessions.AddStore ("Work Folders");



  • John Cutsinger

    It still has its default name "Personal Folder" after this.Session.AddStore("Work Folders").
    Why


  • Create a store and assign it a name (Outlook)