+ Reply to Thread
Results 1 to 17 of 17

Email as PDF attachment for multiple recipients

  1. #1
    Forum Contributor
    Join Date
    09-12-2015
    Location
    Okinawa, Japan
    MS-Off Ver
    2013
    Posts
    178

    Email as PDF attachment for multiple recipients

    Hi all,

    I would like to be able to attach a worksheet as a pdf in outlook based whether a checkbox is selected for that sheet. I have attached a basic model of what I would like to accomplish. There are five sheets for five customers each with an different email address. I would like to select which ones will get an email, press a button to email them and generate the separate email for each with their respective sheet as a pdf attachment.

    Your help is always appreciated.

    Ken
    Attached Files Attached Files

  2. #2
    Valued Forum Contributor
    Join Date
    03-24-2014
    Location
    England
    MS-Off Ver
    Excel 2003 - 2016
    Posts
    575

    Re: Email as PDF attachment for multiple recipients

    http://www.rondebruin.nl/win/s1/outlook/mail.htm

  3. #3
    Forum Contributor
    Join Date
    09-12-2015
    Location
    Okinawa, Japan
    MS-Off Ver
    2013
    Posts
    178

    Re: Email as PDF attachment for multiple recipients

    Thank you BellyGas for getting me started.

    I have uploaded the excel file with code that generates a pdf attachment and generates an email in Outlook. What I need now is help with modifying the code to fit my needs.

    The code looks for an email address in Cell A1 on every sheet and will email that sheet if A1 has an email address. What I need it to do is look at SHEET "Dashboard" and if Column "E" is TRUE and there is an email address in Column "C" then generate the email for that respective sheet.

    I have tried unsuccessfully to create a loop that looks for both of these things, but made little progress.

    I appreciate any help you can offer.

    Thank you.
    Ken
    Attached Files Attached Files

  4. #4
    Forum Contributor
    Join Date
    09-12-2015
    Location
    Okinawa, Japan
    MS-Off Ver
    2013
    Posts
    178

    Re: Email as PDF attachment for multiple recipients

    Hi all,

    I'm trying to figure this out and could really use some help.

    Here is what I have thus far.

    Please Login or Register  to view this content.
    The problem is it loops through and creates an email with attachment for every sheet. I need it to look at COLUMN "E" to check for TRUE and COLUMN "C" to check for an email address and then only create email with attachment for sheets listed in respective COLUMN "B".

    Your help is greatly appreciated.

    Ken
    Attached Files Attached Files

  5. #5
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Email as PDF attachment for multiple recipients

    Hi Ken

    Change your Button Code to this...
    Please Login or Register  to view this content.
    John

    If you have issues with Code I've provided, I appreciate your feedback.

    In the event Code provided resolves your issue, please mark your Thread as SOLVED.

    If you're satisfied by any members response to your issue please use the star icon at the lower left of their post.

  6. #6
    Forum Contributor
    Join Date
    09-12-2015
    Location
    Okinawa, Japan
    MS-Off Ver
    2013
    Posts
    178

    Re: Email as PDF attachment for multiple recipients

    Excellent fix John. I am very grateful.
    Ken

  7. #7
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Email as PDF attachment for multiple recipients

    You're welcome...glad I could help. Thanks for the Rep.

  8. #8
    Forum Expert
    Join Date
    04-23-2009
    Location
    Matrouh, Egypt
    MS-Off Ver
    Excel 2013
    Posts
    6,892

    Re: Email as PDF attachment for multiple recipients

    That's wonderful Mr. Jaslake. Really very useful code
    I tested it but I noticed that the pdf attachment is sent twice not once ..How can it be edited to send the attachment for once not twice?
    < ----- Please click the little star * next to add reputation if my post helps you
    Visit Forum : From Here

  9. #9
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Email as PDF attachment for multiple recipients

    Hi Yasser

    I don't seem to have that issue when I test, sorry.

  10. #10
    Forum Expert
    Join Date
    04-23-2009
    Location
    Matrouh, Egypt
    MS-Off Ver
    Excel 2013
    Posts
    6,892

    Re: Email as PDF attachment for multiple recipients

    Quote Originally Posted by jaslake View Post
    Hi Yasser

    I don't seem to have that issue when I test, sorry.
    Never mind .. The code is still awesome
    Thanks a lot for sharing it

  11. #11
    Forum Contributor
    Join Date
    09-12-2015
    Location
    Okinawa, Japan
    MS-Off Ver
    2013
    Posts
    178

    Re: Email as PDF attachment for multiple recipients

    John,

    A follow-up question if I may.

    If the section:

    Please Login or Register  to view this content.
    I changed the StrBody to:
    Please Login or Register  to view this content.
    At home this works great, when I came to work today to check it, it doesn't put the contents of ("J2") in the body of the email. Any thoughts?
    At home I use Office 2013 and at work it is Office 2010
    Ken

  12. #12
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Email as PDF attachment for multiple recipients

    Hi Ken

    In the workbook you've attached the value of J2 is blank...

  13. #13
    Forum Contributor
    Join Date
    09-12-2015
    Location
    Okinawa, Japan
    MS-Off Ver
    2013
    Posts
    178

    Re: Email as PDF attachment for multiple recipients

    Thank you John for the additional help.
    Here is a copy with "J2" having data.
    Ken
    Attached Files Attached Files
    Last edited by majime01; 10-17-2016 at 12:44 AM.

  14. #14
    Forum Contributor
    Join Date
    09-12-2015
    Location
    Okinawa, Japan
    MS-Off Ver
    2013
    Posts
    178

    Re: Email as PDF attachment for multiple recipients

    Hey John,
    update...tried again at home and it places the value of J2 in the body of the email. At work, no dice.

    Ken

  15. #15
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Email as PDF attachment for multiple recipients

    Hi Ken

    I have no idea...it works as expected on my platform.

  16. #16
    Forum Contributor
    Join Date
    09-12-2015
    Location
    Okinawa, Japan
    MS-Off Ver
    2013
    Posts
    178

    Re: Email as PDF attachment for multiple recipients

    I will assume it has something to do with a network policy then. I appreciate your help. Take care.
    Ken

  17. #17
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Email as PDF attachment for multiple recipients

    Hi Ken

    I have tested on Excel 2010 (your Work Platform) and the Code performs as expected. Hope you get it sorted...let us know.

+ 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. Email Different Data to Multiple Recipients
    By COWserSoze in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-11-2015, 08:54 AM
  2. Help with Macro to email attachment to multiple recipients
    By markharris2004 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-01-2014, 08:48 AM
  3. Help please!? Multiple email recipients in VBA code
    By ExcelFailure in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-20-2013, 11:16 PM
  4. [SOLVED] How to send Lotus email with VBA to more recipients and also to more copy recipients
    By Sachy in forum Excel Programming / VBA / Macros
    Replies: 15
    Last Post: 03-20-2013, 03:23 PM
  5. Multiple email recipients from excel
    By Brontosaurus in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 01-25-2010, 07:00 AM
  6. [SOLVED] Email multiple recipients
    By jomili in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-14-2009, 09:25 AM
  7. email multiple recipients issue
    By asreid2527 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-07-2009, 11: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