+ Reply to Thread
Results 1 to 6 of 6

Email Macro to attach a non active worksheet to outlook email

  1. #1
    Forum Contributor
    Join Date
    02-21-2013
    Location
    newcastle
    MS-Off Ver
    2011
    Posts
    111

    Email Macro to attach a non active worksheet to outlook email

    hi all

    i am after a macro or advice on attaching a worksheet to a email (outlook). the way the worksheet works is that it will not be the active sheet that needs to be attached to the email.

    can anyone help please

    mick

  2. #2
    Forum Contributor
    Join Date
    03-12-2013
    Location
    Chicago, USA
    MS-Off Ver
    Excel 2007
    Posts
    230

    Re: Email Macro to attach a non active worksheet to outlook email

    Are you saying that you are in a workbook with only two worksheets and you want to attach the second, non-active, worksheet to an email and do not want the recipients to see the currently active worksheet? Or are you saying that you want to attach a workbook that is not even open?

  3. #3
    Forum Contributor
    Join Date
    02-21-2013
    Location
    newcastle
    MS-Off Ver
    2011
    Posts
    111

    Re: Email Macro to attach a non active worksheet to outlook email

    yes mate

    workbook with two sheets, i want to attach the non active one only and not the active one. so basically create a macro that takes second sheet,makes a new workbook and emails it to

    mick

  4. #4
    Forum Contributor
    Join Date
    03-12-2013
    Location
    Chicago, USA
    MS-Off Ver
    Excel 2007
    Posts
    230

    Re: Email Macro to attach a non active worksheet to outlook email

    I'm not sure how to mail just one worksheet without creating a new workbook. This macro will Save the current workbook in whatever location you specify with a new name. Change the file path and name to whatever you want. I like to keep the same file name so that it saves over itself every time I use the macro so that that I don't have hundreds of saved files. It's up to you if you want to keep backups though. The macro then deletes the active worksheet, leaving only the second worksheet. It will then attach itself to a new email for you!

    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    11-21-2013
    Location
    United Kingdom
    MS-Off Ver
    Excel 2013
    Posts
    19

    Re: Email Macro to attach a non active worksheet to outlook email

    Hi All

    I don't want to start a new thread here as I have a problem on exactly the same subject. It's been driving me mad for days.

    I can create the email no problem but the email is just a part of a macro which saves saves a sheet from a workbook to pdf and sends it to a folder. The problem I'm having as attaching the saved pdf to the email. I've tried every combination of address for the file imaginable without success, I've attached the code to see if anyone can see where I'm going wrong. I've left my last attempt at the address in the .Attachments for you to see

    Kind regards

    Paul

    Please Login or Register  to view this content.
    http://www.excelforum.com/excel-prog...ml#post3484804
    Last edited by FDibbins; 11-21-2013 at 08:37 PM.

  6. #6
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,936

    Re: Email Macro to attach a non active worksheet to outlook email

    Paul, thanks for reporting your post on this thread

    To create your own thread for this, 1st copy all your text from here (I added the link to this thread for when you copy), click FORUM, select the VBA forum, new thread - then paste and submit

    I added the link to this so that members can see what was done here
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

+ 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. [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
  2. macro to email only active sheet as PDF attach
    By ChrisCPA7 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-17-2012, 04:45 PM
  3. Macro to attach workbook to Outlook email but NOT send
    By kbwilsdon in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 11-11-2009, 06:57 AM
  4. Automatically attach Excel spreadsheet to Outlook Email with Macro?
    By nbaj2k in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 08-01-2006, 11:45 AM
  5. How can i attach active workbook to email- please see the macro
    By stric in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-14-2005, 06:05 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