+ Reply to Thread
Results 1 to 5 of 5

Syntax to check names in outlook after pasting adresses into "To" line

  1. #1
    Registered User
    Join Date
    12-02-2016
    Location
    Germany
    MS-Off Ver
    2010 and 2013
    Posts
    21

    Syntax to check names in outlook after pasting adresses into "To" line

    Hi there,
    I am searching the correct syntax to let the macro "click" on the 'Check Names" button.
    The open mail macro and the rest is working perfectly. Just want to hav ethe macro doing the check names

    Here's the full macro, which is working fne

    Dim MailList
    MailList = Range("MailList").Value
    'here the mail list gets defined

    Range("MailList").Select
    Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
    :=False, Transpose:=False
    Application.CutCopyMode = False
    Range("A1").Select

    DoEvents
    MailList = Range("MailList").Value

    Set moft = CreateObject("Outlook.Application")
    If moft Is Nothing Then
    outl = Shell("outlook.exe")
    Set moft = CreateObject("Outlook.Application")
    End If

    Set mMail = moft.CreateItem(0)
    mMail.To = MailList
    mMail.CC = ""
    mMail.BCC = ""
    mMail.Subject = "example "
    mMail.Body = "Dear all"
    mMail.Display


    All I need at the end is the check names task

    Thanks in advance for your help

  2. #2
    Forum Expert
    Join Date
    10-09-2014
    Location
    Newcastle, England
    MS-Off Ver
    2003 & 2013
    Posts
    1,986

    Re: Syntax to check names in outlook after pasting adresses into "To" line

    The following is a function shamelessly found via google....
    Please Login or Register  to view this content.
    The original post is here > http://stackoverflow.com/questions/3...utton-in-excel
    If someone has helped you then please add to their Reputation

  3. #3
    Registered User
    Join Date
    12-02-2016
    Location
    Germany
    MS-Off Ver
    2010 and 2013
    Posts
    21

    Re: Syntax to check names in outlook after pasting adresses into "To" line

    Hello pjwhitfield,

    thanks so much for your fast reply - unfortunately this doesn't work.
    the macro completely steps over this part

    Dim OLApp As Object 'Outlook.Application
    Dim oRecip As Object 'Outlook.Recipient
    Dim oEU As Object 'Outlook.ExchangeUser
    Dim oEDL As Object 'Outlook.ExchangeDistributionList

    Also tried to run the whole as a separate macro, but it does not even open outlook...

    Maybe I am simply not getting the logic, yet :-)

  4. #4
    Registered User
    Join Date
    12-02-2016
    Location
    Germany
    MS-Off Ver
    2010 and 2013
    Posts
    21

    Re: Syntax to check names in outlook after pasting adresses into "To" line

    I think I know what the issue with your proposal is

    The macro you found wants to do the "Check Names" in Excel itself.

    But what I need is the additional task in outlook itself, after my macro pasted the list of names into the "To" line

    Cheers

  5. #5
    Registered User
    Join Date
    12-02-2016
    Location
    Germany
    MS-Off Ver
    2010 and 2013
    Posts
    21

    Re: Syntax to check names in outlook after pasting adresses into "To" line

    Found it here in the forum :-) (from Izandol )
    pretty simple thing :-)

    .Recipients.ResolveAll

    http://www.excelforum.com/showthread.php?t=983139

+ 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. Run *.bat once the outlook mail received with Subject line "welcome" on daily by user
    By yogananda.muthaiah in forum Outlook Programming / VBA / Macros
    Replies: 6
    Last Post: 02-15-2021, 10:23 AM
  2. VBA Outlook Email "Check Names"
    By musicman1985 in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 01-11-2019, 03:53 PM
  3. Create meeting in outlook from VBA and 'open' "TO" line
    By JasperD in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 12-13-2015, 08:31 AM
  4. Replies: 5
    Last Post: 01-23-2014, 11:02 AM
  5. Excel Function that differentiates "male" from "female" names with 900+ names
    By doylehargrove in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 09-17-2012, 06:00 PM
  6. MSoffice Outlook 2003 message to be saved in C dir with the file name "From" "Sent" "Sub"
    By shailendra0509 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-09-2012, 01:32 AM
  7. [SOLVED] create links to check boxes marked "good" fair"and "bad"
    By pjb in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 04-19-2006, 09:25 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