Ureader.com  
Microsoft software help and Community
   home   |   control panel login   |   archive   |  
 
Outlook
bcm
calendaring
contacts
fax
general
installation
interop
outlook
printing
program_addins
program_forms
program_vba
teamfolders
thirdpartyutil
  
 
date: Mon, 6 Oct 2008 13:40:28 -0600,    group: microsoft.public.outlook.program_vba        back       


Refering to a folder   
I created a folder under the "Personal Folders" root

How do I refer to it using VBA?


Bre-x
date: Mon, 6 Oct 2008 13:40:28 -0600   author:   Bre-x

RE: Refering to a folder   
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 
> 
> 
>
date: Mon, 6 Oct 2008 13:46:46 -0700   author:   Sue Mosher [MVP-Outlook]

Re: Refering to a folder   
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
>>
>>
>>
date: Mon, 6 Oct 2008 14:59:41 -0600   author:   Bre-x

Google
 
Web ureader.com


    COPYRIGHT 2007, YARDI TECHNOLOGY LIMITED, ALL RIGHT RESERVE  |   contact us