verify contact before sending

Status
Not open for further replies.

dawondr

Member
Outlook version
Email Account
Exchange Server
Hi all, I'm really hoping someone can help me. I have a couple of people that I contact that have the same first names. When I go to the "TO" line and start typing I sometimes will click the wrong name. As an example I have a man named Ron that is in my company and I also have a customer named Ron who is in my personal contacts. They do not have the same last name but when multitasking (read as not paying attention) I have sent and internal e-mail to the external client.

Is there a macro or a rule or something I can set that says if I am sending an e-mail to this person some kind of a warning or verification screen can pop? "u r sending this to Ron Jones, did you mean Smith"? Or any type of an added step to make sure I do not make that mistake again? There are only 2 duplicate names. Ron and Lawrence. One of each is in my corp contact gallery and the other one of each is in my personal contacts list if that helps to "set the trap".

I would like to think after getting burned I would remember but sad to say it has happened more than once so slowing down, paying more attention will not work. Nor will setting all messages to go out after a X minute delay because if I didnt catch it when writting it I'm not going to realize it 5 or 10 minutes later.

By the way, I am using Outlook 2007 if that matters...

Anything anyone can suggest to help me would really be appriciated.
 
You can use a macro to check the email address and ask - i use a similar one to make sure i use the correct email account when i send mail to a private mailing list where only one of my addresses is approved.

See http://www.slipstick.com/how-to-outlook/prevent-sending-messages-to-wrong-email-address/ for a code sample. I'd probably use this for the two addresses. if you have more than 2 to check, a case statement would be more efficient.

If InStr(LCase(Item.To), "bad@address.com") or InStr(LCase(Item.To), "otherbad@address.com") Then

There is an example on that page with a case statement, you'll want to switch the item.send line with the prompt, if, and end if lines.
 
You can use a macro to check the email address and ask - i use a similar one to make sure i use the correct email account when i send mail to a private mailing list where only one of my addresses is approved.

See http://www.slipstick.com/how-to-outlook/prevent-sending-messages-to-wrong-email-address/ for a code sample. I'd probably use this for the two addresses. if you have more than 2 to check, a case statement would be more efficient.

If InStr(LCase(Item.To), "bad@address.com") or InStr(LCase(Item.To), "otherbad@address.com") Then

There is an example on that page with a case statement, you'll want to switch the item.send line with the prompt, if, and end if lines.

Thank you, one last question please, I believe the difference between the "check Messages you send" and the "Check addresses in the To, CC, or BCC field using the Recipient Collection" is just that, the first looks only at the TO line while the second would also monitor the CC line as well as the TO line correct? I'm sure that is the difference but I just want to make sure please.
 
Yes, the one with the To line won't check the other fields. The part that checks the recipients can be added to the macro that uses Case.
 
Great, thank you very much. I hope you have a great weekend.

Dave
 
Actually, because the recipient collection checks each address separately, you don't need the instr part, just lcase (just in case an address uses mixed case)

If LCase(recip) ="bad@address.com" Then

or replace that line with these two

Select Case LCase(recip)
Case "alias@domain.com", "alias2@domain3.com", "alias3@domain3.com"
 
Hi Diane, Happy Saturday. I'm sorry to bother you but I can not get this to work. I tried entering my e-mail as a test and was able to send one to myself with no verification popping up. This is exactly what I have in my VBA windoe with the exception of my actual e-mail address. Am I missing something? This is Outlook 2007

Private Sub Application_ItemSend(ByVal Item As Object, Cancel As Boolean)

Dim Recipients As Outlook.Recipients
Dim recip As Outlook.Recipient
Dim i
Dim prompt As String


On Error Resume Next
' use lower case for the address
' LCase converts all addresses in the To field to lower case
Set Recipients = Item.Recipients
For i = Recipients.Count To 1 Step -1
Set recip = Recipients.Item(i)

If LCase(recip) = "john.smith@yahoo.com" Then
prompt$ = "You sending this to bad@address.com. Are you sure you want to send it?"
If MsgBox(prompt$, vbYesNo + vbQuestion + vbMsgBoxSetForeground, "Check Address") = vbNo Then
Cancel = True
End If
End If

Next i


End Sub
 
It works here. I use the code to popup a message when i send a message to one address so i can confirm I'm using the correct account - only difference is my prompt:

prompt$ = "You sending this to the list. Are you sure you want to send it from " & Item.SendUsingAccount

- - - Updated - - -

Is your macro security set to allow macros? That's a typical reason why macros don't work.
 
Status
Not open for further replies.
Similar threads
Thread starter Title Forum Replies Date
C "The linked image cannot be displayed. The file may have been moved, renamed, or deleted. Verify that the link points to the correct file location" Using Outlook 1
D Cannot verify or add the calendar to Outlook Using Outlook 6
G Outlook 2021 Add Picture to Custom Contact Form Outlook VBA and Custom Forms 2
AndyZ Contact Custom Form Tiny Text Outlook VBA and Custom Forms 3
A How to reduce size of custom contact form? Outlook VBA and Custom Forms 3
S Custom Contact card - need help creating one Outlook VBA and Custom Forms 1
U Outlook 2021 not showing contact cards in Searches Using Outlook 1
Witzker Outlook 2019 Macro to seach in all contact Folders for marked Email Adress Outlook VBA and Custom Forms 1
Witzker How to get the button Karte ( map) in custom contact form Outlook VBA and Custom Forms 2
G Adding a contact to a specific folder Using Outlook 0
B Linking contact to an Appointment Using Outlook 1
Witzker Outlook 2019 How to get a Photo in a User Defined Contact form Outlook VBA and Custom Forms 2
Witzker Outlook 2019 Macro to send an Email Template from User Defined Contact Form Outlook VBA and Custom Forms 0
jehan2256 "History" button in Business Contact Manager Using Outlook 1
Witzker Outlook 2019 Edit contact from email does not open the user defined contactform Using Outlook 3
Horsepower Contact phone numbers randomly change Using Outlook 0
Witzker Set Cursor & Focus from any field to the body of a user Contact form in OL 2019 Outlook VBA and Custom Forms 1
Witzker Place cursor at opening, a user defined OL contact form Outlook VBA and Custom Forms 3
M Contact deletion Using Outlook 2
R Roadrunner Email Settings | Contact Roadrunner Customer Support Outlook VBA and Custom Forms 0
M Accessing ALL Outlook contact fields Outlook VBA and Custom Forms 3
S Outlook 365 Shared mailbox contact group member numbers not matching Using Outlook 0
D Contact Group - Adding Bulk Addresses Using Outlook 2
F Outlook 365 No scroll bars in Contact Using Outlook 2
N Contact Form Notes Field Touch vs Mouse Using Outlook 0
J "Contact" button in Journal entry Using Outlook 1
Witzker How to find all emails from and to a contact in OL 2019 Using Outlook 6
D Advanced e-Mail search on from/to contact group only searches for first 20 contacts in group Using Outlook 0
G Send a greeting message to a contact on birthday Outlook VBA and Custom Forms 5
S CONTACT FIELD PRINT ORDER Outlook VBA and Custom Forms 1
I Button PDF in Outlook Contact custom form Outlook VBA and Custom Forms 1
O Outlook 365 - How to create / copy a new contact from an existing one? Using Outlook 5
N contact list seen in Contact folder but knot in Address book or when 'TO' button is clicked in new email Using Outlook 0
M Disable Contact Card Results when using "Search People" in Outlook Ribbon Using Outlook 7
M Contact suggestion Using Outlook 2
H Custom Outlook Contact Form VBA Outlook VBA and Custom Forms 1
Witzker HowTo Change message Class of contact form Outlook VBA and Custom Forms 0
Witzker Open Contact missing in Outlook 2019 Using Outlook 2
Witzker HowTo start a macro with an Button in OL contact form Outlook VBA and Custom Forms 12
Witzker Pls help to change the code for inserting date in Ol contact body Outlook VBA and Custom Forms 5
R Time for another article on contact cards? Using Outlook 0
O Create a custom contact form - questions before messing things up... Outlook VBA and Custom Forms 4
M vCard does not have user-defined fields from my custom contact form (365) Using Outlook 1
C Copy Outlook contact field value to another field Outlook VBA and Custom Forms 1
W Remove specific contacts from contact list Outlook VBA and Custom Forms 3
GregS 2016 Contact List being managed by Outlook.com? Using Outlook 1
F Copy and replace not update contact in another pst Using Outlook 0
A Sending contact vcards sends older version instead of updated version Using Outlook 4
T Outlook 2010 Correct way to map multiple contact fields Using Outlook 4
Victor_50 Outlook 2013 Custom Contact Form starts with "E-mail 2" Outlook VBA and Custom Forms 2

Similar threads

Back
Top