View Single Post
 
Old 03-18-2016, 10:15 PM
gmayor's Avatar
gmayor gmayor is offline Windows 10 Office 2016
Expert
 
Join Date: Aug 2014
Posts: 4,137
gmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud of
Default

OK if it is always a distribution list called BOB then surround the
Code:
If Item.Attachments.Count > 0 Then
    '...............
End If
with

Code:
If Item.To = "Bob" then
    If Item.Attachments.Count > 0 Then
        '...............
    End If
End if
However I don't see why this is necessary, as it will already flag a warning if the subject and the attachment don't match, whoever the message is sent to. Other attachments are unaffected. By adding the sender distribution list to the mix, you increase the danger of sending a message to the wrong person, rather than reduce it.
__________________
Graham Mayor - MS MVP (Word) (2002-2019)
Visit my web site for more programming tips and ready made processes www.gmayor.com
Reply With Quote