I created a folder under the "Personal Folders" root How do I refer to it using VBA? Bre-x
Use the GetDefaultFolder method and Parent and Folders properties to walk up and down the folder hierarchy, e.g.: Set inbox = Application.Session.GetDefaultFolder(olFolderInbox) Set root = inbox.Parent Set myFolder = root.Folders("Name of My Folder") -- Sue Mosher, Outlook MVP Author of Microsoft Outlook 2007 Programming: Jumpstart for Power Users and Administrators http://www.outlookcode.com/article.aspx?id=54 "Bre-x" wrote: > I created a folder under the "Personal Folders" root > > How do I refer to it using VBA? > > > Bre-x > > >
Thanks, it works fine. now, if you dont mind, how to add and Item? thnks "Sue Mosher [MVP-Outlook]" wrote in message news:4207ACCA-B65B-4F19-9A26-A875A1E04AAC@microsoft.com... > Use the GetDefaultFolder method and Parent and Folders properties to walk > up > and down the folder hierarchy, e.g.: > > Set inbox = Application.Session.GetDefaultFolder(olFolderInbox) > Set root = inbox.Parent > Set myFolder = root.Folders("Name of My Folder") > -- > Sue Mosher, Outlook MVP > Author of Microsoft Outlook 2007 Programming: > Jumpstart for Power Users and Administrators > http://www.outlookcode.com/article.aspx?id=54 > > > > > "Bre-x" wrote: > >> I created a folder under the "Personal Folders" root >> >> How do I refer to it using VBA? >> >> >> Bre-x >> >> >>