Results 1 to 5 of 5
  1. #1
    3 Star Lounger
    Join Date
    Jun 2009
    Location
    Hemet CA
    Posts
    310
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Talking

    Iím using excel 2007 and on a Workbook Iím using called ďReportsĒ it has 10 different sheets I use. What I want to do is attach a code to my tool bar ribbon (which I know how to do) (Add-in or use UI Editor) so that whatever sheet Iím on at the present time I will be able to attach that sheet and send it via email using yahoo. Is this possible. Hereís what code I have so far, it not much
    Also is it possible to not select just the range using like A1:B5 because each sheet is different. Could it be set to use only pre-select printing pages.

    Code:
    Private Sub CommandButton1_Click()
    ActiveWorkbook.SendMail Range("A1:B5"), "sheet1"
    MsgBox "The file has been sent", vbOKOnly
    ActiveWorkbook.Close SaveChanges:=False
    End Sub

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts
    See Ron de Bruin's Example Code for sending mail from Excel for lots of detailed examples. (Note that the more advanced ones require Outlook because it offers more programmatic control than the SendMail method).

  3. #3
    5 Star Lounger
    Join Date
    Aug 2001
    Location
    Surrey, United Kingdom
    Posts
    1,001
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Good evening

    I have looked at your post on the Mr. Excel forum and l would have given you the same advice, check Ron de Bruin's page as he indeed seems to be the Excel to email guru, in case you have not checked that post a link to Ron's web is here "Ron de Bruin".

    If I can find anything else I will post back
    Cheers

    Steve

    Asking the questions everbody wants the answers too but feels too stupid to ask themselves :-)

  4. #4
    5 Star Lounger
    Join Date
    Aug 2001
    Location
    Surrey, United Kingdom
    Posts
    1,001
    Thanks
    0
    Thanked 0 Times in 0 Posts
    [quote name='stevehocking' post='787383' date='03-Aug-2009 21:00']Good evening

    I have looked at your post on the Mr. Excel forum and l would have given you the same advice, check Ron de Bruin's page as he indeed seems to be the Excel to email guru, in case you have not checked that post a link to Ron's web is here "Ron de Bruin".

    If I can find anything else I will post back[/quote]

    Sorry, cross posted with Hans, his 14 fingers are faster than my 10!!

    The very next Google turned up this example for using an IMAP http://www.excelforum.com/excel-programmin...ail-client.html

    HTH
    Cheers

    Steve

    Asking the questions everbody wants the answers too but feels too stupid to ask themselves :-)

  5. #5
    3 Star Lounger
    Join Date
    Jun 2009
    Location
    Hemet CA
    Posts
    310
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Talking

    [quote name='stevehocking' post='787386' date='03-Aug-2009 13:04']Sorry, cross posted with Hans, his 14 fingers are faster than my 10!!

    The very next Google turned up this example for using an IMAP http://www.excelforum.com/excel-programmin...ail-client.html

    HTH[/quote]
    Thank you HansV and stevehocking for this info, I shall investigate further.

Posting Permissions

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