C
Carol G
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
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