+ Reply to Thread
Results 1 to 5 of 5

Marco To Create PDF Using Specific Sheets & Attach To Outlook Email

  1. #1
    Forum Contributor Gtrtim112's Avatar
    Join Date
    04-12-2013
    Location
    Alabama, USA
    MS-Off Ver
    Excel 2016
    Posts
    332

    Marco To Create PDF Using Specific Sheets & Attach To Outlook Email

    Can anyone tell me why my macro isn't working properly?

    The following code has been working flawlessly for quite some time but now it won't do as I need it to.

    I want the macro to take specific sheets, create a PDF with them and attach the PDF file to an Outlook email. In this case, it's sheets 2, 3, 4 and 8. However, it will only attach the active sheet. I can't figure out why.

    Please Login or Register  to view this content.
    Thanks!

  2. #2
    Forum Expert Logit's Avatar
    Join Date
    12-23-2012
    Location
    North Carolina
    MS-Off Ver
    Excel 2019 Professional Plus - 2007 Enterprise
    Posts
    7,021

    Re: Marco To Create PDF Using Specific Sheets & Attach To Outlook Email

    .
    Please Login or Register  to view this content.
    Attached Files Attached Files

  3. #3
    Forum Contributor Gtrtim112's Avatar
    Join Date
    04-12-2013
    Location
    Alabama, USA
    MS-Off Ver
    Excel 2016
    Posts
    332

    Re: Marco To Create PDF Using Specific Sheets & Attach To Outlook Email

    Thanks, Logit! I will give this a whirl in the morning and let you know if it works for me.

  4. #4
    Forum Contributor Gtrtim112's Avatar
    Join Date
    04-12-2013
    Location
    Alabama, USA
    MS-Off Ver
    Excel 2016
    Posts
    332
    Actually, I just noticed something...

    It doesn’t appear to have the code that would tell it where the email addresses are listed on one of the sheets. Look at my previous code and you’ll see they are listed in AA10 on a particular sheet.

    Can you add that command into the code you offered?

    Quote Originally Posted by Logit View Post
    .
    Please Login or Register  to view this content.

  5. #5
    Forum Expert Logit's Avatar
    Join Date
    12-23-2012
    Location
    North Carolina
    MS-Off Ver
    Excel 2019 Professional Plus - 2007 Enterprise
    Posts
    7,021

    Re: Marco To Create PDF Using Specific Sheets & Attach To Outlook Email

    .
    Replace this line in the macro of the workbook I attached :
    Please Login or Register  to view this content.
    With this line :
    Please Login or Register  to view this content.

    Change the sheet names in these two lines to the sheet name where you have the command button to run the macro:

    Please Login or Register  to view this content.
    If the Command Button is located on Sheet 1 .... don't change it.

+ 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. VBA to create PDF from worksheet and attach to Outlook Email
    By aglawrence in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-20-2017, 04:02 PM
  2. [SOLVED] PDF - open outlook email and attach PDF
    By passman86 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-02-2017, 10:00 AM
  3. attach file in an outlook email from specific folder
    By 9599lorenzo in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-19-2017, 07:07 AM
  4. [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
  5. [SOLVED] Email Macro to attach a non active worksheet to outlook email
    By mickgibbons1 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 11-21-2013, 08:38 PM
  6. Marco to send email via MAC (Outlook is working fine)
    By angela1979 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-28-2013, 07:10 PM
  7. [SOLVED] Macro to create a pdf and attach to an email (Outlook)
    By jsedore in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 02-01-2013, 03:16 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