How do I bypass standard Outlook check function when user doesn't fill the MailItem object's .To
property?
If MailItem.To
is blank I receive an error message.
My goal is to create a function to check when the .To
property is blank to avoid VBA error and show a msg box, stop VBA script until object .To is correctly filled.
Dim objMail As Outlook.MailItem
Dim objWho As String
objWho = objMail.To
If objMail.To xxxEpmty.something Then
MsgBox ("Object To is blank")
Else
objWho = objMail.To