ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Automatically e-mailing a sheet (https://www.excelbanter.com/excel-programming/343270-automatically-e-mailing-sheet.html)

Maury Markowitz

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

Joshua Stollar

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.


Tom Ogilvy

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" wrote in
message ...
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




Joshua Stollar

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.


Maury Markowitz

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


Tom Ogilvy

Automatically e-mailing a sheet
 
that sends the whole workbook not the selected range.

--
Regards,
Tom Ogilvy

"Joshua Stollar" wrote in message
oups.com...
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.




Brian Matlack[_14_]

Automatically e-mailing a sheet
 

Maury:
Try this page http://www.rondebruin.nl/sendmail.htm it may have what
you need


--
Brian Matlack
------------------------------------------------------------------------
Brian Matlack's Profile: http://www.excelforum.com/member.php...fo&userid=3508
View this thread: http://www.excelforum.com/showthread...hreadid=477633


Ron de Bruin

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" wrote in message
...
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




Maury Markowitz

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

Ron de Bruin

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" wrote in message
...
"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




Tom Ogilvy

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" wrote in
message ...
"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




Maury Markowitz

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


Maury Markowitz

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


Ron de Bruin

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" wrote in message
...
"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




Ron de Bruin

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" wrote in message
...
"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




John Huang

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.




All times are GMT +1. The time now is 03:17 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com