Results 1 to 3 of 3

Need to be able to send email with attached PDF file based on a list

Threaded View

  1. #1
    Registered User
    Join Date
    06-06-2019
    Location
    Blaine, Minnesota USA
    MS-Off Ver
    2013, 2016
    Posts
    15

    Need to be able to send email with attached PDF file based on a list

    Hello,

    Currently I have a workbook that can create a pdf file from a list and stores it in a location. I have tried creating a macro that looks at the list and sends the pdf file to the emails specified in the list.

    I have not been able to figure out why the file doesn't get attached.


    
    Sub Send_email_to_Customer()
    
    Dim o As Outlook.Application
    Set o = New Outlook.Application
    Dim omail As Outlook.MailItem
    Set omail = o.CreateItem(olMailItem)
    
    Dim i As Long
    
            For i = 8 To Range("A1000").End(xlUp).Row
            
                With omail
                .Subject = Cells(i, 2).Value
                .To = Cells(i, 3).Value
                .CC = Cells(i, 4).Value
                .CC = Cells(i, 5).Value
                .Body = Cells(i, 6).Value
                .attachments.Add Cells(i, 7).Value
                .Display
            
            End With
    
        Next
    
    End Sub

    Any help would be appreciated!

    Thanks,
    Jonathan
    Last edited by jkhuskies; 09-03-2019 at 10:40 PM. Reason: Adding code

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Respond email using Outlook based in data in Range A9 (from attached file)
    By fabian_76 in forum Excel Programming / VBA / Macros
    Replies: 13
    Last Post: 04-11-2018, 05:18 PM
  2. VBA Send email to Contact Group / Distribution List File
    By hamidxa in forum Outlook Formatting & Functions
    Replies: 0
    Last Post: 09-16-2016, 12:54 PM
  3. Replies: 1
    Last Post: 08-01-2016, 10:50 AM
  4. macro to send an email with an active excel sheet attached
    By megtoma in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-21-2014, 11:37 PM
  5. Generate path of a file in column and send email as attachment based on a cell value
    By anchuri_chaitanya in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 09-04-2013, 02:01 AM
  6. Send excel file attached in email
    By vijanand1279 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 06-06-2013, 03:55 AM
  7. Send email integrating cell data into Subject and Body, with attached invoice
    By KarBar110 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 11-08-2012, 05:36 PM

Tags for this Thread

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