Thanks Thanks:  0
Likes Likes:  0
Results 1 to 4 of 4

Thread: A macro to do this......

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

    Default

    Anyone know a macro or some VB code that will do this:

    1. save the current file
    2. E-mail it to a certain address(probably gonna have to close the file 1st right)

    so is that possible? will the macro continue to run once i close the file? Can excel e-mail for a start let alone e-mail attachments?

    Any help appreciated

  2. #2
    MrExcel MVP
    Join Date
    Feb 2002
    Location
    Sydney, Australia
    Posts
    2,940
    Post Thanks / Like
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Default

    How about this?

    Code:
    Sub SaveAndMail()
    ActiveWorkbook.Save
    ActiveWorkbook.SendMail "anyone@somewhere.com"
    End Sub
    HTH,
    D

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

    Default

    yeah looks good, but will it send while the file is still open? spose i can just popup a messgae saying "close the file before sending the e-mail u sonofa.... no good...."

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

    Default

    Ohhh very nice! Excel even makes a temporary file to send. Me like!
    Thanks man

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
  •