Consulting

Results 1 to 5 of 5

Thread: Solved: Macro to Email Excel workbook

  1. #1

    Solved: Macro to Email Excel workbook

    When I searched this topic, I found some 500 threads most of which were not remotely applicable. Here's what I'm trying to do:

    I am sending a 4-worksheet workbook with blank forms to 50 different people, asking them to complete them and return them to me by email. I want to assign a macro to a button which:

    1) starts the File>Send to>As Attachment routine
    2) fills in my email address in the "To" line of the MS Outlook email screen
    3) sends the email with the attachment to me

    Is there a way to automate this process, so that the users do not have to figure out how to do it and/or to look for my email address>

    Many thanks!

  2. #2
    Moderator VBAX Master geekgirlau's Avatar
    Joined
    Aug 2004
    Location
    Melbourne, Australia
    Posts
    1,464
    Location
    [vba]
    ActiveWorkbook.SendMail "MyEmail@whatever.com", "Subject of Email"
    [/vba]

  3. #3
    Thank you! Will it be sufficient to add a sub name and "end sub" and insert it in a module? I presume that "subject of email" is a standard subject line that I should complete, e.g. "Completed Survey Forms."

  4. #4
    I have found these links to be extremely helpful:

    http://www.rondebruin.nl/sendmail.htm
    ~Heather

  5. #5
    Thank you both. In the meantime, I checked the code provided by geekgirlau and confirmed that it works like a charm.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •