P
paresh
Hi,
I have noticed that below code works fine when I put it in
ThisOutlookSession or in OutAddIn.cls(Add-in's class module). Is it possible
to put this code in any module(modOutlook.bas) or designer(Connect.Dsr) and
make it works?
Thanks,
Paresh
My code in
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
I have noticed that below code works fine when I put it in
ThisOutlookSession or in OutAddIn.cls(Add-in's class module). Is it possible
to put this code in any module(modOutlook.bas) or designer(Connect.Dsr) and
make it works?
Thanks,
Paresh
My code in
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