none
I want to add new store and named "New Folder" in outlook RRS feed

  • Question

  • I want  to add new store and named "New Folder" in outlook, how to do by VBA code? I  don't want to use "For Each oStore In colStores   Set oRoot = oStore.GetRootFolder
      oRoot.Name = "New Folder" next"  who give me a  direct way? Thanks
    Wednesday, January 30, 2013 4:15 AM

Answers

  • Use the NameSpace.AddStore() or ..AddStoreEx() method. The Object Browser help in the Outlook VBA project has sample code.

    --
    Ken Slovak
    [MVP-Outlook]
    http://www.slovaktech.com
    Author: Professional Programming Outlook 2007
    "yk乐乐" <=?utf-8?B?eWvkuZDkuZA=?=> wrote in message news:8be6cc98-b649-46c6-b360-d58aa775ddae...
    I want  to add new store and named "New Folder" in outlook, how to do by VBA code? I  don't want to use "For Each oStore In colStores   Set oRoot = oStore.GetRootFolder
      oRoot.Name = "New Folder" next"  who give me a  direct way? Thanks

    Ken Slovak MVP - Outlook
    Wednesday, January 30, 2013 2:49 PM
    Moderator

All replies

  • just to be sure - you want to add new store that will be named 'new folder' or you want to add new store and 'new folder' just beneath it?
    Wednesday, January 30, 2013 9:12 AM
  • Use the NameSpace.AddStore() or ..AddStoreEx() method. The Object Browser help in the Outlook VBA project has sample code.

    --
    Ken Slovak
    [MVP-Outlook]
    http://www.slovaktech.com
    Author: Professional Programming Outlook 2007
    "yk乐乐" <=?utf-8?B?eWvkuZDkuZA=?=> wrote in message news:8be6cc98-b649-46c6-b360-d58aa775ddae...
    I want  to add new store and named "New Folder" in outlook, how to do by VBA code? I  don't want to use "For Each oStore In colStores   Set oRoot = oStore.GetRootFolder
      oRoot.Name = "New Folder" next"  who give me a  direct way? Thanks

    Ken Slovak MVP - Outlook
    Wednesday, January 30, 2013 2:49 PM
    Moderator
  • I want to add new store that will be named 'new folder' ,Thanks
    Friday, February 1, 2013 12:56 AM
  • try to follow Ken's advice and use AddStoreEx
    Friday, February 1, 2013 7:47 AM
  • Thanks, I used the code :myNamespace.AddStore "con.pst" and the new store is created in Outlook, but  the name is not "new folder" ,how to changed the strore's name , I  want to get the new store, it's name is "new folder"
    Thursday, February 7, 2013 5:16 AM
  • Can you tell  me how to use the "NameSpace.AddStore() " , I konw :NameSpace.AddStore "D:\con.pst" , Is there other parameter ? For example: NameSpace.AddStore "D:\con.pst", filename , I have a complex idea , loop every stores of outlook and judge the store's path , if the path is "D:\con.pst", I will change store's name  , I get success  , but I think that it is complex way,it is not a good idea, Do you have a simple way? Thanks
    Thursday, February 7, 2013 5:27 AM
  • Neither AddStore() nor AddStoreEx() have an argument for setting the store name. If you are using Redemption you can do that after you add an RDOStore to the RDOStores colleciton, but not using the Outlook object model's AddStore() or AddStoreEx().

    Ken Slovak MVP - Outlook

    Thursday, February 7, 2013 4:33 PM
    Moderator