D
Darren H Gill
Hi,
I am trying to automate Outlook from Access VBA so that I can open a public
folder and select a contact from it.
My application needs to be able to read information from the public folder
ContactItem object.
I have trid to bind an explorer object declared as
Private WithEvents OutlookExplorer As Outlook.Explorer
I display the explorer from a class method:
Dim oFolder As Outlook.MAPIFolder
Set oFolder = GetOutlookFolderFromID(CStr(FolderID))
Set OutlookExplorer = oFolder.GetExplorer(olFolderDisplayNoNavigation)
Call OutlookExplorer.ShowPane(olFolderList, False)
Call OutlookExplorer.ShowPane(olPreview, False)
Call OutlookExplorer.ShowPane(olPreview, False)
OutlookExplorer.Activate
What I then tried to do was read the Explorer Selection collection in the
SelectionChanged event.
Private Sub OutlookExplorer_SelectionChange()
Debug.Print "SElection Changed ..."
If OutlookExplorer.Selection.Count Then
'Process the selected contacts
End If
End Sub
However, My problem seems to be that the event does not fire! Am I missing
something fundamental here?
Thanks,
Darren Gill
I am trying to automate Outlook from Access VBA so that I can open a public
folder and select a contact from it.
My application needs to be able to read information from the public folder
ContactItem object.
I have trid to bind an explorer object declared as
Private WithEvents OutlookExplorer As Outlook.Explorer
I display the explorer from a class method:
Dim oFolder As Outlook.MAPIFolder
Set oFolder = GetOutlookFolderFromID(CStr(FolderID))
Set OutlookExplorer = oFolder.GetExplorer(olFolderDisplayNoNavigation)
Call OutlookExplorer.ShowPane(olFolderList, False)
Call OutlookExplorer.ShowPane(olPreview, False)
Call OutlookExplorer.ShowPane(olPreview, False)
OutlookExplorer.Activate
What I then tried to do was read the Explorer Selection collection in the
SelectionChanged event.
Private Sub OutlookExplorer_SelectionChange()
Debug.Print "SElection Changed ..."
If OutlookExplorer.Selection.Count Then
'Process the selected contacts
End If
End Sub
However, My problem seems to be that the event does not fire! Am I missing
something fundamental here?
Thanks,
Darren Gill