+ Reply to Thread
Results 1 to 16 of 16

Automatically e-mailing a sheet

  1. #1
    Maury Markowitz
    Guest

    Automatically e-mailing a sheet

    I'm trying to make a macro to send out a spreadsheet every night. The manual
    operation consists of selecting the active range, then using Send To from the
    File menu and filling out an e-mail address.

    When I try to record these steps as a macro, the resulting code only
    contains the selection action. The Send To doesn't appear!

    Anyone know what's going on here?

    Maury

  2. #2
    Forum Contributor
    Join Date
    12-04-2003
    Location
    Burrton, Kansas USA
    MS-Off Ver
    2003
    Posts
    162
    Maury:
    Try this page http://www.rondebruin.nl/sendmail.htm it may have what you need

  3. #3
    Joshua Stollar
    Guest

    Re: Automatically e-mailing a sheet

    Workbook(Index).Activate
    ActiveWorkbook.SendMail Recipients:="", Subject:="",
    ReturnReceipt:=True or False

    Remember to have your default email program configured, it will also
    ask/tell you that a program is trying to send mail without you doing
    anything, just select not to tell/ask you again. That way it can
    happen at night without any user interaction.


  4. #4
    Tom Ogilvy
    Guest

    Re: Automatically e-mailing a sheet

    In code create a new single sheet workbook
    paste in your data

    Activeworkbook.SendMail Recipient:= , Subject:=


    --
    Regards,
    Tom Ogilvy

    "Maury Markowitz" <[email protected]> wrote in
    message news:[email protected]...
    > I'm trying to make a macro to send out a spreadsheet every night. The

    manual
    > operation consists of selecting the active range, then using Send To from

    the
    > File menu and filling out an e-mail address.
    >
    > When I try to record these steps as a macro, the resulting code only
    > contains the selection action. The Send To doesn't appear!
    >
    > Anyone know what's going on here?
    >
    > Maury




  5. #5
    Joshua Stollar
    Guest

    Re: Automatically e-mailing a sheet

    Workbooks(Index).Activate
    ActiveWorkbook.SendMail Recipients:="", Subject:="",
    ReturnReceipt:=True or False

    Remember to have your default email program configured, it will also
    ask/tell you that a program is trying to send mail without you doing
    anything, just select not to tell/ask you again. That way it can
    happen at night without any user interaction.


  6. #6
    Maury Markowitz
    Guest

    Re: Automatically e-mailing a sheet

    "Joshua Stollar" wrote:

    > Workbook(Index).Activate
    > ActiveWorkbook.SendMail Recipients:="", Subject:="",
    > ReturnReceipt:=True or False


    Thanks!

    Interestingly there does not seem to be an option to turn off the warning in
    question, at least not in the warning dialog box itself. I'll poke around
    inside Outlook and see what I can find there.

    Maury


  7. #7
    Tom Ogilvy
    Guest

    Re: Automatically e-mailing a sheet

    that sends the whole workbook not the selected range.

    --
    Regards,
    Tom Ogilvy

    "Joshua Stollar" <[email protected]> wrote in message
    news:[email protected]...
    > Workbooks(Index).Activate
    > ActiveWorkbook.SendMail Recipients:="", Subject:="",
    > ReturnReceipt:=True or False
    >
    > Remember to have your default email program configured, it will also
    > ask/tell you that a program is trying to send mail without you doing
    > anything, just select not to tell/ask you again. That way it can
    > happen at night without any user interaction.
    >




  8. #8
    Ron de Bruin
    Guest

    Re: Automatically e-mailing a sheet

    Try

    http://www.rondebruin.nl/mail/folder1/mail4.htm
    Or
    http://www.rondebruin.nl/mail/folder2/mail4.htm

    And see this for info about the security warning
    http://www.rondebruin.nl/mail/prevent.htm

    --
    Regards Ron de Bruin
    http://www.rondebruin.nl


    "Maury Markowitz" <[email protected]> wrote in message
    news:[email protected]...
    > I'm trying to make a macro to send out a spreadsheet every night. The manual
    > operation consists of selecting the active range, then using Send To from the
    > File menu and filling out an e-mail address.
    >
    > When I try to record these steps as a macro, the resulting code only
    > contains the selection action. The Send To doesn't appear!
    >
    > Anyone know what's going on here?
    >
    > Maury




  9. #9
    Maury Markowitz
    Guest

    Re: Automatically e-mailing a sheet

    "Tom Ogilvy" wrote:

    > In code create a new single sheet workbook
    > paste in your data
    >
    > Activeworkbook.SendMail Recipient:= , Subject:=


    I take it back, this does NOT work. It sends the entire book as an
    attachment. What I want is the selection to appear inside the mail message,
    as it would when I used Send To.

    I looked at the docs on the SendMail method, it appears to have no switches
    and can only be applied to the workbook object, not a sheet or selection.

    Ideas?

    Maury

  10. #10
    Ron de Bruin
    Guest

    Re: Automatically e-mailing a sheet

    Hi Maury

    Try
    http://www.rondebruin.nl/mail/folder3/mail4.htm


    --
    Regards Ron de Bruin
    http://www.rondebruin.nl


    "Maury Markowitz" <[email protected]> wrote in message
    news:[email protected]...
    > "Tom Ogilvy" wrote:
    >
    >> In code create a new single sheet workbook
    >> paste in your data
    >>
    >> Activeworkbook.SendMail Recipient:= , Subject:=

    >
    > I take it back, this does NOT work. It sends the entire book as an
    > attachment. What I want is the selection to appear inside the mail message,
    > as it would when I used Send To.
    >
    > I looked at the docs on the SendMail method, it appears to have no switches
    > and can only be applied to the workbook object, not a sheet or selection.
    >
    > Ideas?
    >
    > Maury




  11. #11
    Tom Ogilvy
    Guest

    Re: Automatically e-mailing a sheet

    You said you want to send a spreadsheet every night.

    What I suggested would send a single sheet workbook/spreadsheet with just
    the active range. (possibly you can't implement the suggestion)

    If you want your email to have html text then use what Ron suggests.

    --
    Regards,
    Tom Ogilvy



    "Maury Markowitz" <[email protected]> wrote in
    message news:[email protected]...
    > "Tom Ogilvy" wrote:
    >
    > > In code create a new single sheet workbook
    > > paste in your data
    > >
    > > Activeworkbook.SendMail Recipient:= , Subject:=

    >
    > I take it back, this does NOT work. It sends the entire book as an
    > attachment. What I want is the selection to appear inside the mail

    message,
    > as it would when I used Send To.
    >
    > I looked at the docs on the SendMail method, it appears to have no

    switches
    > and can only be applied to the workbook object, not a sheet or selection.
    >
    > Ideas?
    >
    > Maury




  12. #12
    Maury Markowitz
    Guest

    Re: Automatically e-mailing a sheet

    "Tom Ogilvy" wrote:

    > You said you want to send a spreadsheet every night.
    >
    > What I suggested would send a single sheet workbook/spreadsheet with just
    > the active range. (possibly you can't implement the suggestion)


    Just to be sure I understand this statement, your code would make a workbook
    with a single sheet in it, and mail that as an attachment, correct?

    Maury


  13. #13
    Maury Markowitz
    Guest

    Re: Automatically e-mailing a sheet

    "Ron de Bruin" wrote:
    > http://www.rondebruin.nl/mail/folder3/mail4.htm


    I tried this, and got all excited. However I have found that it adds a very
    large blank space to the left side of the message.

    Do you have any idea why this is, and how to get rid of it?

    You think this would be easier...

    Maury


  14. #14
    Ron de Bruin
    Guest

    Re: Automatically e-mailing a sheet

    Yes that was Tom's suggestion

    I posted also two links that do that

    http://www.rondebruin.nl/mail/folder1/mail4.htm
    Or
    http://www.rondebruin.nl/mail/folder2/mail4.htm

    And see this for info about the security warning
    http://www.rondebruin.nl/mail/prevent.htm


    --
    Regards Ron de Bruin
    http://www.rondebruin.nl


    "Maury Markowitz" <[email protected]> wrote in message
    news:[email protected]...
    > "Tom Ogilvy" wrote:
    >
    >> You said you want to send a spreadsheet every night.
    >>
    >> What I suggested would send a single sheet workbook/spreadsheet with just
    >> the active range. (possibly you can't implement the suggestion)

    >
    > Just to be sure I understand this statement, your code would make a workbook
    > with a single sheet in it, and mail that as an attachment, correct?
    >
    > Maury
    >




  15. #15
    Ron de Bruin
    Guest

    Re: Automatically e-mailing a sheet

    Check out this
    http://www.contextures.com/xlfaqApp.html#Unused


    --
    Regards Ron de Bruin
    http://www.rondebruin.nl


    "Maury Markowitz" <[email protected]> wrote in message
    news:[email protected]...
    > "Ron de Bruin" wrote:
    >> http://www.rondebruin.nl/mail/folder3/mail4.htm

    >
    > I tried this, and got all excited. However I have found that it adds a very
    > large blank space to the left side of the message.
    >
    > Do you have any idea why this is, and how to get rid of it?
    >
    > You think this would be easier...
    >
    > Maury
    >




  16. #16
    John Huang
    Guest

    Re: Automatically e-mailing a sheet

    Hi Joshua,


    In your email, you stated tthe followin:

    Remember to have your default email program configured, it will also
    ask/tell you that a program is trying to send mail without you doing
    anything, just select not to tell/ask you again. That way it can
    happen at night without any user interaction

    I don't know where to set up in MS exchange. Could you help?

    John Huang

    "Joshua Stollar" wrote:

    > Workbook(Index).Activate
    > ActiveWorkbook.SendMail Recipients:="", Subject:="",
    > ReturnReceipt:=True or False
    >
    > Remember to have your default email program configured, it will also
    > ask/tell you that a program is trying to send mail without you doing
    > anything, just select not to tell/ask you again. That way it can
    > happen at night without any user interaction.
    >
    >


+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1