Consulting

Results 1 to 6 of 6

Thread: Is there a way after macro runs to email.............

  1. #1

    Is there a way after macro runs to email.............

    Is there a way that after a macro is run to send out by email just the updated sheet not entire workbook ?



    Regards

    Merc




  2. #2
    VBAX Regular justme's Avatar
    Joined
    Jun 2004
    Posts
    41
    Location
    There is a lot of good information on code for sending mail from Excel at this site
    http://www.rondebruin.nl/sendmail.htm

    HTH

  3. #3
    Justme

    how do you code the line if u have 10-20 recipitents ?

    Merc

  4. #4
    Moderator VBAX Wizard lucas's Avatar
    Joined
    Jun 2004
    Location
    Tulsa, Oklahoma
    Posts
    7,323
    Location
    mercmannick
    If you go to the top of this page and click on kbase you will find many scripts that address emailing excel files and sheets. When you get to the kbase main page, click on search and search for mail or email. I saw three submissions there on the 1st part of the search return, probably more there. If you don't find what you need or you need help, post back here.

    Here is a link to the knowledgebase search engine:
    http://www.vbaexpress.com/kb/default.php?action=search
    Steve
    "Nearly all men can stand adversity, but if you want to test a man's character, give him power."
    -Abraham Lincoln

  5. #5
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    Quote Originally Posted by mercmannick
    Justme

    how do you code the line if u have 10-20 recipitents ?

    Merc
    Instead of using the To property, you could add Recipients, like so

    .script12hide { display: none; }

    Set oRecipient = OutMail.Recipients.Add("some.body@somewhere.com")
            oRecipient.Type = 1 '1 = To, use 2 for cc
                                  'keep repeating these lines with
                                  'your names, adding to the collection.

    or you could create a distribution list and mail to that
    ____________________________________________
    Nihil simul inventum est et perfectum

    Abusus non tollit usum

    Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
    James Thurber

  6. #6
    Administrator
    VP-Knowledge Base
    VBAX Guru MOS MASTER's Avatar
    Joined
    Apr 2005
    Location
    Breda, The Netherlands
    Posts
    3,281
    Location
    Quote Originally Posted by mercmannick
    how do you code the line if u have 10-20 recipitents ?
    Hi,

    Example 2 on this page:
    http://www.rondebruin.nl/mail/folder1/mail2.htm

    HTH,
    _________
    Groetjes,

    Joost Verdaasdonk
    M.O.S. Master

    Mark your thread solved, when it has been, by hitting the Thread Tools dropdown at the top of the thread.
    (I don't answer questions asked through E-mail or PM's)

Posting Permissions

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