+ Reply to Thread
Results 1 to 11 of 11

Emailing an attached spreadsheet

  1. #1
    Registered User
    Join Date
    08-30-2007
    Posts
    82

    Emailing an attached spreadsheet

    Hi Guys

    A while ago some great guys on here helped me to to add a worksheet as an attachment to an outlook email by having a button on the spreadsheet itself. This works great and if it was you then many thanks. However I have added another worksheet which i would like to add to the same email ie 2 attached worksheets to the same email this being decontamination certificate. I have tried to do this myself by copying and pasteing some of the code and changeing the paths and name but all I get is one or the other or the wrong name to the worksheet.

    Is there anyone out there who can look at the code and see where i am going wrong please.

    Thanks PhilCAR Log 12.xls
    Last edited by Phil Walters; 11-29-2012 at 08:50 AM.

  2. #2
    Valued Forum Contributor Sean Thomas's Avatar
    Join Date
    03-25-2012
    Location
    HerneBay, Kent, UK
    MS-Off Ver
    Excel 2007,2016
    Posts
    971

    Re: Emailing an attached spreadsheet

    try this, this should copy 2 sheets to a new workbook

    Please Login or Register  to view this content.
    the second sheet needs to be copied to sheet(2) not 1

    you cant save the work book twice as different workbooks - delete this line
    Please Login or Register  to view this content.
    then delete this line
    Please Login or Register  to view this content.

  3. #3
    Valued Forum Contributor Sean Thomas's Avatar
    Join Date
    03-25-2012
    Location
    HerneBay, Kent, UK
    MS-Off Ver
    Excel 2007,2016
    Posts
    971

    Re: Emailing an attached spreadsheet

    if you want to send 2 workbooks, you will need to copy the first sheet, save it as Customer Returns.xlsx
    then copy sheet2 and then save that as Decontamination Certificate.xlsx

    then you can add both workbooks as attachments to the mail.

  4. #4
    Registered User
    Join Date
    08-30-2007
    Posts
    82

    Re: Emailing an attached spreadsheet

    Can anyone help with this?

  5. #5
    Registered User
    Join Date
    08-30-2007
    Posts
    82

    Re: Emailing an attached spreadsheet

    Hi Sean Thanks for your help.

    I ave done what you have suggested although i am unsure about the second post you sent regarding saving the workbooks. I am assuming you mean both files saved under different names.

    I have tried all this and not the email function does not work. Something is happening but outlook is not opening a new email with any attachments.

    Phil

  6. #6
    Valued Forum Contributor Sean Thomas's Avatar
    Join Date
    03-25-2012
    Location
    HerneBay, Kent, UK
    MS-Off Ver
    Excel 2007,2016
    Posts
    971

    Re: Emailing an attached spreadsheet

    Hi,
    i have updated your workbook with some code i have used before.
    This works on my pc.
    You may need to change the name of the file you are saving the new work book as.
    You cant save the new file as the same name as the one you are creating it from.

    Should be ok

    Sean
    Attached Files Attached Files

  7. #7
    Registered User
    Join Date
    08-30-2007
    Posts
    82

    Re: Emailing an attached spreadsheet

    Hi Sean

    i have tried this but all i get is the name decontamination certificate in the attached area but the attachment is the returns file. not sure what you mean regarding saveing as different name.

    Thanks for all your efforts.

  8. #8
    Valued Forum Contributor Sean Thomas's Avatar
    Join Date
    03-25-2012
    Location
    HerneBay, Kent, UK
    MS-Off Ver
    Excel 2007,2016
    Posts
    971

    Re: Emailing an attached spreadsheet

    Sorry my computer crashed and i think it lost my version.
    If i get a chance i will recreate it later. Had it all working nicely as well!!!

  9. #9
    Valued Forum Contributor Sean Thomas's Avatar
    Join Date
    03-25-2012
    Location
    HerneBay, Kent, UK
    MS-Off Ver
    Excel 2007,2016
    Posts
    971

    Re: Emailing an attached spreadsheet

    Hi,
    I have recreated it.
    Hopefully this is what you require.
    it copies 2 of your sheets onto a new workbook, opens outlook, attaches it to a mail.

    i have placed a few comments in the code to help you.

    Sean
    Attached Files Attached Files

  10. #10
    Valued Forum Contributor Sean Thomas's Avatar
    Join Date
    03-25-2012
    Location
    HerneBay, Kent, UK
    MS-Off Ver
    Excel 2007,2016
    Posts
    971

    Re: Emailing an attached spreadsheet

    Hi, i have added some additional code to save 2 individual sheets as 2 new workbooks and add them as attachments in the mail. Just in case.

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

  11. #11
    Registered User
    Join Date
    08-30-2007
    Posts
    82

    Re: Emailing an attached spreadsheet

    outstanding
    Thanks Sean

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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