+ Reply to Thread
Results 1 to 8 of 8

Validate EMail Address

  1. #1
    Forum Contributor
    Join Date
    01-24-2013
    Location
    India
    MS-Off Ver
    Excel 2019
    Posts
    100

    Validate EMail Address

    Hi Friends,

    Is it possible to check the email address included in the TO field alone.

    For E.G. If am sending an invoice to XYZ company then the mail address ideally should be [email protected] if i entered any wrong address say [email protected] then the Draft mail needs to be closed automatically after showing the warning message say " The mail address is not valid".

    I always include the company name in the subject field.

    Regards
    Shyam

  2. #2
    Registered User
    Join Date
    09-27-2011
    Location
    India
    MS-Off Ver
    Excel 2003
    Posts
    86

    Re: Validate EMail Address

    Hi Shyam,

    I hope you will be having all the target email address before processing to the send the mail.
    Check the assigned variable of the email address consists any of the contents in the Subject, if any send the mail else exit.
    Hope this logic helps, else let me know the code I will tweak it.

    Regards,
    lokicl

  3. #3
    Forum Contributor
    Join Date
    01-24-2013
    Location
    India
    MS-Off Ver
    Excel 2019
    Posts
    100

    Re: Validate EMail Address

    Please share the code i will check it out

  4. #4
    Forum Contributor
    Join Date
    08-27-2006
    Posts
    136

    Re: Validate EMail Address

    I think you were supposed to try coding yourself.

    The single address in the To line must have the @ symbol.

    Please Login or Register  to view this content.
    To mark "Solved" go to Thread Tools.

  5. #5
    Forum Contributor
    Join Date
    01-24-2013
    Location
    India
    MS-Off Ver
    Excel 2019
    Posts
    100

    Re: Validate EMail Address

    Thanks for the code skatonni.

    I am new to coding still learning. I have modified the code to get company name alone from the subject and also wanted to check multiple Email address in the TO field is this possible and once the condition fails the drafted mail needs to be closed.

    Please Login or Register  to view this content.

  6. #6
    Forum Contributor
    Join Date
    08-27-2006
    Posts
    136

    Re: Validate EMail Address

    Drop the bits pulling the subject from the To address.

    Please Login or Register  to view this content.

  7. #7
    Forum Contributor
    Join Date
    01-24-2013
    Location
    India
    MS-Off Ver
    Excel 2019
    Posts
    100

    Re: Validate EMail Address

    Sorry skatonni. Am not sure how to modify this am getting error message. Could you please guide me.

  8. #8
    Forum Contributor
    Join Date
    08-27-2006
    Posts
    136

    Re: Validate EMail Address

    Here is working code.


    Please Login or Register  to view this content.
    Private Sub Application_ItemSend_test()

    Dim currItem As Object
    Dim cancel As Boolean

    Set currItem = ActiveInspector.CurrentItem
    Application_ItemSend currItem, False

    End Sub

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Validate email address in the correct format
    By PhotoJoe in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 02-12-2009, 12:37 PM
  2. Validate an email address
    By hustla7 in forum Excel General
    Replies: 2
    Last Post: 08-27-2006, 01:55 PM
  3. Validate an Email Address
    By Duncan in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-26-2006, 02:40 PM
  4. Validate email address
    By Ken Valenti in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-23-2006, 08:35 PM
  5. [SOLVED] Validate an email address
    By BethP in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-12-2005, 07:05 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1