+ Reply to Thread
Results 1 to 13 of 13

Attach current spreadsheet and open outlook

  1. #1
    Forum Contributor
    Join Date
    09-30-2014
    Location
    Singapore
    MS-Off Ver
    2010
    Posts
    266

    Attach current spreadsheet and open outlook

    Hi

    Is there a way to input a button on excel and to let it know once i press it to attach the current excel worksheet and open outlook with the subject and content of the email entered.

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,719

    Re: Attach current spreadsheet and open outlook

    What's wrong with the attach to E-mail option that already exists in Excel?
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  3. #3
    Forum Contributor
    Join Date
    09-30-2014
    Location
    Singapore
    MS-Off Ver
    2010
    Posts
    266

    Re: Attach current spreadsheet and open outlook

    Hi Ali,

    I would like to place this as a add on function on the report it self. So that users with a click of a button, can auto open to outlook and have the report attached to be send. As the recipient and the content of the message will always be the same, It would be more faster. I guess just like the quick steps function in outlook.

  4. #4
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    13,210

    Re: Attach current spreadsheet and open outlook

    with a click of a button can auto open to outlook and have the report attached to be send
    link this code to button and play around with it...
    Please Login or Register  to view this content.
    Good Luck
    I don't presume to know what I am doing, however, just like you, I too started somewhere...
    One-day, One-problem at a time!!!
    If you feel I have helped, please click on the star to left of post [Add Reputation]
    Also....add a comment if you like!!!!
    And remember...Mark Thread as Solved.
    Excel Forum Rocks!!!

  5. #5
    Forum Contributor
    Join Date
    09-30-2014
    Location
    Singapore
    MS-Off Ver
    2010
    Posts
    266

    Re: Attach current spreadsheet and open outlook

    Hi There. I have placed the code as given and had an error copile error message when I run the macros.
    Attached Files Attached Files

  6. #6
    Forum Guru bakerman2's Avatar
    Join Date
    10-03-2012
    Location
    Antwerp, Belgium
    MS-Off Ver
    MO Prof Plus 2016
    Posts
    6,907

    Re: Attach current spreadsheet and open outlook

    Please Login or Register  to view this content.
    Avoid using Select, Selection and Activate in your code. Use With ... End With instead.
    You can show your appreciation for those that have helped you by clicking the * at the bottom left of any of their posts.

  7. #7
    Forum Contributor
    Join Date
    09-30-2014
    Location
    Singapore
    MS-Off Ver
    2010
    Posts
    266

    Re: Attach current spreadsheet and open outlook

    Hi there. The code worked toan extent. I did receive an message that said the VB can't be used in a macro free workbook. This happened because the code opened report into a new worksheet. Should i edit the code to WhateverName.xlsm to not not prompt this dialog box? the second thing is that I noticed the new workbook that opened only had one worksheet which had the button. The rest of the worksheet in this file was not placed in the attachment.

  8. #8
    Forum Guru bakerman2's Avatar
    Join Date
    10-03-2012
    Location
    Antwerp, Belgium
    MS-Off Ver
    MO Prof Plus 2016
    Posts
    6,907

    Re: Attach current spreadsheet and open outlook

    Change 51 to 52.
    attach the current excel worksheet
    The code works on the active sheet when running so if your sheet has no data you copy an empty sheet.

  9. #9
    Forum Expert sintek's Avatar
    Join Date
    12-04-2015
    Location
    Cape Town
    MS-Off Ver
    2013 | 2016 | 2019
    Posts
    13,210

    Re: Attach current spreadsheet and open outlook

    Sorry...was out...I see bakerman2 solved...Tx for rep+

  10. #10
    Forum Contributor
    Join Date
    09-30-2014
    Location
    Singapore
    MS-Off Ver
    2010
    Posts
    266

    Re: Attach current spreadsheet and open outlook

    Hi Guys,

    If i need the code to attach the whole workbook instead of sheet, how do i amend

  11. #11
    Forum Guru bakerman2's Avatar
    Join Date
    10-03-2012
    Location
    Antwerp, Belgium
    MS-Off Ver
    MO Prof Plus 2016
    Posts
    6,907

    Re: Attach current spreadsheet and open outlook

    Please Login or Register  to view this content.

  12. #12
    Forum Contributor
    Join Date
    09-30-2014
    Location
    Singapore
    MS-Off Ver
    2010
    Posts
    266

    Re: Attach current spreadsheet and open outlook

    Thanks Bakerman2

  13. #13
    Forum Guru bakerman2's Avatar
    Join Date
    10-03-2012
    Location
    Antwerp, Belgium
    MS-Off Ver
    MO Prof Plus 2016
    Posts
    6,907

    Re: Attach current spreadsheet and open outlook

    You're welcome and thanks for rep+.

+ 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] 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
  2. [SOLVED] Define 3 print areas, make a PDF, open and attach the PDF to Microsoft Outlook.
    By gnaske in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-07-2017, 04:03 AM
  3. Attach last saved file outlook/add this to quick step in Outlook
    By Nravota in forum Outlook Programming / VBA / Macros
    Replies: 0
    Last Post: 06-25-2015, 06:25 AM
  4. Macros to open new outlook email and attach the excel sheet
    By nageshpolu in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 06-23-2014, 02:26 PM
  5. open spreadsheet if a cell is the current date
    By myjebay1 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 04-02-2013, 11:49 AM
  6. Outlook - Save Worksheet as PDF and attach to outlook mail
    By kaurka in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 11-05-2012, 10:19 AM
  7. 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

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