Results 1 to 4 of 4

vba email send from excel - ignore second email address if "ENTER EMAIL ADDRESS"

Threaded View

  1. #1
    Forum Expert nigelog's Avatar
    Join Date
    12-14-2007
    Location
    Cork, Ireland
    MS-Off Ver
    Office 365 Windows 10
    Posts
    2,293

    vba email send from excel - ignore second email address if "ENTER EMAIL ADDRESS"

    I am using the below code to email a worksheet from a macro using email addresses in cells chosen from a dropdrown list. The last cell reference is to allow the user to enter email address not available on the dropdown lists, an "ad hoc" address that the code then changes the cell entry back to "ENTER EMAIL ADDRESS".

    I would like the macro to test the value of cell [f14] and if "ENTER EMAIL ADDRESS" ignore and do not add to the recipient list along with cell [I6]
        Set OutApp = CreateObject("Outlook.Application")
        Set OutMail = OutApp.CreateItem(0)
    
        With Destwb
            
            .SaveAs TempFilePath & TempFileName & FileExtStr, FileFormat:=FileFormatNum
            On Error Resume Next
            With OutMail
                .to = [i6].Value & ";" & [F14].Value
                .CC = [i10].Value
                .BCC = ""
                .Subject = "Incident Report"
                .Body = "Incident Report Attached"
                .Attachments.Add Destwb.FullName
                '.Send
                .DISPLAY
    any assistance appreciated. Rgds....
    Last edited by nigelog; 09-28-2016 at 05:07 AM.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] VBA to send email using data from the EXCEL including email address, subject and body text
    By ec4excel in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-18-2016, 11:07 AM
  2. rule to send an email alert to another email address
    By wayneg in forum Outlook Formatting & Functions
    Replies: 1
    Last Post: 02-08-2016, 06:15 PM
  3. Send an email via outlook from and address other than your default email.
    By sungen99 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-28-2015, 06:15 PM
  4. [SOLVED] Send email as To address to all email id stored in excel
    By santbiju1 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 11-05-2015, 03:03 AM
  5. VBA code to send email to the people whose email address is in the Access table
    By aman1234 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 04-30-2014, 05:11 AM
  6. Email workbook to email address in cell "a1" macro
    By klawlor in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 01-15-2013, 09:20 AM
  7. Replies: 6
    Last Post: 12-02-2011, 02:14 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