P
paresh
Hi,
I have noticed that below code works fine if I put that code in
ThisOutlookSession or in OutAddIn.cls(Add-in). Is it possible to put this
code in any module(.bas) or designers(Connect.Dsr) code and make it work?
Private WithEvents objExpl As Outlook.Explorer
Private Sub objExpl_SelectionChange()
Set objExpl = objOutlook.ActiveExplorer 'Explorer Object
If objExpl.Selection.Count > 0 Then
For Each objMailItem In objExpl.Selection
If objMailItem.Class = olMail Then
msgbox "email item";
End If
Next
End If
End Sub
Thanks,
Paresh
I have noticed that below code works fine if I put that code in
ThisOutlookSession or in OutAddIn.cls(Add-in). Is it possible to put this
code in any module(.bas) or designers(Connect.Dsr) code and make it work?
Private WithEvents objExpl As Outlook.Explorer
Private Sub objExpl_SelectionChange()
Set objExpl = objOutlook.ActiveExplorer 'Explorer Object
If objExpl.Selection.Count > 0 Then
For Each objMailItem In objExpl.Selection
If objMailItem.Class = olMail Then
msgbox "email item";
End If
Next
End If
End Sub
Thanks,
Paresh