Previous Thread:   Changing the name of the "Personal Folders" collection

9/22/2005 11:07:50 AM    Creating a folders collection
It is possible to create folders (MAPIFolder) within the Personal  
  
Folders collection. I learnt that it is also possible to create a top  
  
level folder in the heirarchy, of the same level as Outlook Personal  
  
Folders, with a piece of code like this:  
  
Application.GetNamespace("MAPI").AddStore("MyPSTFile.pst")  
  
However, there are two problems with this approach:  
  
(1) The new folder always gets the name "Personal Folders" irrespective  
  
of the new PST file you create. Can you have a personalized name for  
  
this new store? How?  
  
(2) The method AddStore is a sub-procedure and not a function. In  
  
effect, it doesn't return a value, which one might expect, might be a  
  
reference to the newly added folder collection. How do you get a  
  
reference to the newly added store or folders collection?  
  
(3) Unless you have a reference, you cannot change the name of the  
  
newly created store. Even if we did have a reference, I see that you  
  
cannot change the name of the collection (out of the code, i.e. not  
  
programmatically) even in design mode if you clicked on the  
  
context-menu, "Properties for Personal Folders".



9/22/2005 6:00:35 PM    Re: Creating a folders collection
Thanks for the help, Eric. I have one more problem now.  
  
After I make my folder, I am trying to let it get selected and then on  
  
its selection, open up a web-page like so:  
  
fld.WebViewAllowNavigation = True  
  
fld.WebViewURL = "http://foobar.com"  
  
fld.WebViewOn = True  
  
However, when this happens, I do not see any webpage come up. When I  
  
right-click on the folder to view its properties, too, I do not see  
  
either the home page set nor the check box, "Show home page by default  
  
for this folder" set to on.  
  
How do I do this?  
  
Thanks.  
  
Eric Legault [MVP - Outlook] wrote: