Error Checking in Excel
Thanks Thanks:  0
Likes Likes:  0
Page 1 of 2 12 LastLast
Results 1 to 10 of 13

Thread: Email sheet using a macro

  1. #1
    New Member
    Join Date
    Feb 2002
    Posts
    4
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    HI

    i am trying to get excel to email a sheet to a certain address. I have managed to do this, however when i try and record a macro to perform this task, it doesn't work. Could any one help in providing a code for me to do this.

    Basically all i want to do is send a copy of a filled in sheet to an e-mail address by just pressing a button.

    Thanks for any help

    Christopher Hart

  2. #2
    Board Regular
    Join Date
    Feb 2002
    Location
    Ontario, Canada
    Posts
    337
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    assign this code to a button in your work book.

    Private Sub CommandButton1_Click()

    ActiveWorkbook.SendMail Recipients:="RECIPIENTS E-MAIL", Subject:="Goes Here", ReturnReceipt:=True
    MsgBox "Your Request Has Been Sent", , "Title Goes Here"



    End Sub

  3. #3
    New Member
    Join Date
    Feb 2002
    Posts
    4
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Hi

    Is there a way to just sent a specific sheet rather than the whole workbook.

    I have tried the one that you gave me and as of yet i havn't received the email after sending it through outlook express. It could be that it just takes a while. This is the code that i used.

    Private Sub CommandButton1_Click()

    ActiveWorkbook.SendMail Recipients:="christopher_hart@hotmail.com", Subject:="ClaimsForm", ReturnReceipt:=True
    MsgBox "The Claims Form has been sent", , "Claims Form"



    End Sub


    Thanks very much

    Christopher

  4. #4
    New Member
    Join Date
    Feb 2002
    Posts
    4
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    hi

    i have since got the code working fine. However is there an addition that could be made so that outlook or outlook express is loaded automatically in order to complete the send. Currently excel will say that it has been sent, howeverit has not. To send the file you have to open up outlook/outlook express and send it from there. For inexperienced users this is a problem.

    Is there a code that can be added to open up outlook automatically.

    Thanks

    Christopher

  5. #5
    Board Regular
    Join Date
    Feb 2002
    Location
    Ontario, Canada
    Posts
    337
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    I'm not sure how to send a specific sheet haven't tried that yet.

    The e-mail should go instantly, I've tested it several times on my PC

    τΏτ

    Good luck

  6. #6
    Board Regular
    Join Date
    Feb 2002
    Location
    Ontario, Canada
    Posts
    337
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Sorry didn't read your last post, I'll have to check on Opening Outlook.

    Ziggy

  7. #7
    New Member
    Join Date
    Feb 2002
    Posts
    4
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    hi

    It is all working fine now. It still sends the whole workbook but that isn;t a problem.

    It will send the email automatically using either program

    Thanks for all your help

    Christopher Hart

  8. #8
    Board Regular
    Join Date
    Feb 2002
    Location
    Ontario, Canada
    Posts
    337
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    No Problem glad it helped

  9. #9
    Board Regular
    Join Date
    Feb 2002
    Location
    Jefferson City, Missouri
    Posts
    382
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    I to did like this idea and have just added the code to my spreadsheet but, it worked fine on my home computer. But at work where I will be using the file we do not have Outlook/Express installed, we use Lotus Notes, will this still work using Lotus Notes? o
    I appreciate the help from everyone at Mr. Excel.

    viper

  10. #10
    Board Regular
    Join Date
    Feb 2002
    Location
    Ontario, Canada
    Posts
    337
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    It should work through the default mail program

Some videos you may like

User Tag List

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

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