Results 1 to 4 of 4

Macro to send an attachment via Outlook from excel

Threaded View

  1. #1
    Forum Contributor
    Join Date
    11-04-2012
    Location
    Czech Republic
    MS-Off Ver
    MS 365
    Posts
    267

    Unhappy Macro to send an attachment via Outlook from excel

    Hi


    I found a macro which I would like to modify a bit:

    (Sub mailOutlook()
    Dim OutApp As Object
    Dim OutMail As Object
    Dim stFname As String
    Dim cell As Range

    For Each cell In Range("A1:A5")
    Set OutApp = CreateObject("Outlook.Application")
    Set OutMail = OutApp.createitem(0)
    With OutMail
    .To = cell
    .Subject = Range("C1")
    .Body = Range("C2")
    .display
    '.send (Optional)
    End With
    Next cell

    Set OutMail = Nothing
    Set OutApp = Nothing
    End Su)

    Is there ability to add code in this to send the exact attachment I'm in now? So not only the email but with a file.

    Thank you a lot for you support,
    Andy
    Last edited by dobracik; 05-02-2014 at 03:23 AM. Reason: brakets

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] VBA code to send excel attachment through outlook 2010
    By Liz_Biz in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-04-2014, 08:33 AM
  2. [SOLVED] Macro to send a pdf attachment via outlook from excel
    By Josiah in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 08-26-2013, 02:17 PM
  3. [SOLVED] VBA Macro to print to Pdf format and place as attachment in Outlook (Excel & Outlook 2007)
    By Webman1012 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-29-2013, 01:25 PM
  4. Excel to send email via Outlook (attachment)
    By uncleslinky in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 02-01-2012, 07:01 AM
  5. Send Excel attachment, but wait till Outlook closes
    By thepython in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 01-17-2006, 05:30 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