+ Reply to Thread
Results 1 to 10 of 10

Macro to attach a file to out going emails?

  1. #1
    Registered User
    Join Date
    12-12-2006
    Posts
    34

    Macro to attach a file to out going emails?

    I have a macro set up to send personalized emails to my mailing list and need it to attach a PDF be for sending it. Is there a way to do this? Bellow you can see my current macro. Thanks!

    Please Login or Register  to view this content.
    Last edited by zbor; 11-21-2016 at 09:46 AM.

  2. #2
    Forum Expert
    Join Date
    12-14-2012
    Location
    London England
    MS-Off Ver
    MS 365 Office Suite.
    Posts
    8,448

    Re: Macro to attach a file to out going emails?

    Sorry I am not going to look at your file.

    I use this below:-

    It copies some data into the body of the Email and also attaches a file.

    Please Login or Register  to view this content.
    Last edited by mehmetcik; 11-17-2016 at 04:19 PM.
    My General Rules if you want my help. Not aimed at any person in particular:

    1. Please Make Requests not demands, none of us get paid here.

    2. Check back on your post regularly. I will not return to a post after 4 days.
    If it is not important to you then it definitely is not important to me.

  3. #3
    Registered User
    Join Date
    12-12-2006
    Posts
    34

    Re: Macro to attach a file to out going emails?

    mehmetcik

    I do appreciate your offering help. Unfortunately for me, what you have offered is well above my head. Could you possibly narrow it down to the few parts I need to add to what I have already done?

  4. #4
    Forum Expert Arkadi's Avatar
    Join Date
    02-13-2014
    Location
    Smiths Falls, Ontario, Canada
    MS-Off Ver
    Office 365
    Posts
    5,059

    Re: Macro to attach a file to out going emails?

    Please Login or Register  to view this content.
    where TempFileName is the full path\filename of the file you want to attach
    Please help by:

    Marking threads as closed once your issue is resolved. How? The Thread Tools at the top
    Any reputation (*) points appreciated. Not just by me, but by all those helping, so if you found someone's input useful, please take a second to click the * at the bottom left to let them know

    There are 10 kinds of people in this world... those who understand binary, and those who don't.

  5. #5
    Forum Expert
    Join Date
    12-14-2012
    Location
    London England
    MS-Off Ver
    MS 365 Office Suite.
    Posts
    8,448

    Re: Macro to attach a file to out going emails?

    I am sorry I found this on line a few years ago and modify it to do what I need.

    Cut out the bits that you do not need until you are down to the bare bones. Thats what I do.

    I will cut out the parts that I do not think you need to help.


    Please Login or Register  to view this content.

  6. #6
    Registered User
    Join Date
    12-12-2006
    Posts
    34

    Re: Macro to attach a file to out going emails?

    Thanks Arkadi but I am getting a Syntax error. Any thoughts?

    Please Login or Register  to view this content.
    Last edited by zbor; 11-21-2016 at 09:46 AM.

  7. #7
    Forum Expert Arkadi's Avatar
    Join Date
    02-13-2014
    Location
    Smiths Falls, Ontario, Canada
    MS-Off Ver
    Office 365
    Posts
    5,059

    Re: Macro to attach a file to out going emails?

    try:

    Please Login or Register  to view this content.
    (the quotes around the filename is what I added)
    Last edited by Arkadi; 11-17-2016 at 05:03 PM.

  8. #8
    Registered User
    Join Date
    12-12-2006
    Posts
    34

    Re: Macro to attach a file to out going emails?

    Worked perfectly Arkadi! Thank you very much.

  9. #9
    Forum Expert Arkadi's Avatar
    Join Date
    02-13-2014
    Location
    Smiths Falls, Ontario, Canada
    MS-Off Ver
    Office 365
    Posts
    5,059

    Re: Macro to attach a file to out going emails?

    You're welcome
    Please remember to mark the thread as solved if you are satisfied? Thanks!

    And thanks for the rep.

  10. #10
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,602

    Re: Macro to attach a file to out going emails?

    THTABE,

    Please use code tags around code.

    Posting code between [CODE]Please [url=https://www.excelforum.com/login.php]Login or Register [/url] to view this content.[/CODE] tags makes your code much easier to read and copy for testing, it also maintains VBA formatting.

    Click on Edit to open your thread, then highlight your code and click the # icon at the top of your post window.

    I've fix it now for you.

+ 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. Switched to Windows 10 now macro won't attach file to email
    By lsargent in forum Outlook Programming / VBA / Macros
    Replies: 1
    Last Post: 09-10-2016, 03:14 PM
  2. [SOLVED] Macro to attach an additional file to and outlook email
    By Groovicles in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-18-2014, 01:27 PM
  3. [SOLVED] Macro to attach the file to Outlook from excel
    By Kiran Kurapati in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 04-07-2014, 12:24 PM
  4. Macro to attach the file to Outlook from excel
    By Kiran Kurapati in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-07-2014, 08:52 AM
  5. macro button to attach file to a specific location
    By nicko54 in forum Excel General
    Replies: 0
    Last Post: 06-25-2012, 08:41 PM
  6. attach excel content to emails,based on criteria(very urgent)
    By xiaotianshi in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 05-22-2007, 12:57 AM
  7. How to attach a local file to email using macro?
    By tanks1308 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-11-2007, 12:33 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