View Single Post
  #1  
Old January 16th 07, 02:32 AM posted to microsoft.public.outlook.program_vba
Carol G
external usenet poster
 
Posts: 25
Default Why don't I need a MapiFolder object?

I'm trying to wrap my head around the outlook objects. I'm sure this is a
stupid question but I'm having trouble grasping when I need to declare
objects and when I don't.
Why don't I need a MapiFolder object to view properties such as Name of the
Current Folder below?
Confused....
Carol

Sub TestOfExpolorerObject()
Dim objApp As Outlook.Application
Dim objNms As Outlook.NameSpace
Dim objExplorer As Outlook.Explorer

Set objApp = CreateObject("Outlook.Application")
Set objNms = objApp.GetNamespace("Mapi")
Set objExplorer = objApp.ActiveExplorer

Debug.Print objExplorer.CurrentFolder.Name

Set objApp = Nothing
Set objNms = Nothing
Set objExplorer = Nothing
End Sub


Ads