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:
Try this page http://www.rondebruin.nl/sendmail.htm it may have what you need
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.
In code create a new single sheet workbook
paste in your data
Activeworkbook.SendMail Recipient:= , Subject:=
--
Regards,
Tom Ogilvy
"Maury Markowitz" <MauryMarkowitz@discussions.microsoft.com> wrote in
message news:CE0FD076-05DC-4BE5-BA81-7BA345FE02E6@microsoft.com...
> 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
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.
"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
that sends the whole workbook not the selected range.
--
Regards,
Tom Ogilvy
"Joshua Stollar" <joshua.stollar@gmail.com> wrote in message
news:1129749291.770335.121880@g14g2000cwa.googlegroups.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.
>
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" <MauryMarkowitz@discussions.microsoft.com> wrote in message
news:CE0FD076-05DC-4BE5-BA81-7BA345FE02E6@microsoft.com...
> 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
"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
Hi Maury
Try
http://www.rondebruin.nl/mail/folder3/mail4.htm
--
Regards Ron de Bruin
http://www.rondebruin.nl
"Maury Markowitz" <MauryMarkowitz@discussions.microsoft.com> wrote in message
news:8F18B7CC-3264-4C12-B26E-E02D03A5E840@microsoft.com...
> "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
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" <MauryMarkowitz@discussions.microsoft.com> wrote in
message news:8F18B7CC-3264-4C12-B26E-E02D03A5E840@microsoft.com...
> "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" 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" 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
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" <MauryMarkowitz@discussions.microsoft.com> wrote in message
news:DB580D58-0E3C-49B6-B39D-D971109D115C@microsoft.com...
> "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
>
Check out this
http://www.contextures.com/xlfaqApp.html#Unused
--
Regards Ron de Bruin
http://www.rondebruin.nl
"Maury Markowitz" <MauryMarkowitz@discussions.microsoft.com> wrote in message
news:531528DA-6B48-4F9B-865C-164A026FD690@microsoft.com...
> "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
>
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks