Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / New Users / November 2006

Tip: Looking for answers? Try searching our database.

Need solution for SendTo: Mail Recipient

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
sswilcox - 24 Oct 2006 19:34 GMT
I have developed a small tool to aid our salespeople in preparing sales
proposals. One feature is a button they click that sends all of the
details of the proposal to an expert in our firm for approval and so
that he can keep tabs on everyone's activities and catch any errors.

Yes, I have tried Ron de Bruin's very helpful methods, but they don't
quite work for my situation. They work fine when I use my workbook on
my own PC, but the user-facing workbook is located on our Intranet in a
document management environment, which I suspect is causing all of my
problems.

The data I want to send is all located on one worksheet. If I were
doing it manually I could just go to File/Send To/Mail Recipient option
and everything takes care of itself.

Is there VBA code that will simply allow me to execute that command?

Basically, most of Ron's techniques require a temporary file to be
created, saved, then sent in an email. I get errors on the creation of
the file in that document management environment.

I found another Ron technique that is very promissing
(http://www.rondebruin.nl/mail/folder3/mail2.htm) and actually
generates the email I need, but instead of the data from my worksheet I
just see a blank image that I can click on to select. It also creates a
copy of the worksheet and adds it to my workbook ("Sheet1 (2)").

I'm stuck with Office 2000, unfortunately, which I understand is also
limiting what I can do.

Thanks guys,

S Wilcox
Ken Puls - 24 Oct 2006 19:45 GMT
Try looking up SendMail in the VBA help files or object browser.  It can
be used like this:

ActiveWorkbook.SendMail recipients:="Recipient Name"

HTH,

Ken Puls, CMA - Microsoft MVP (Excel)
www.excelguru.ca

> The data I want to send is all located on one worksheet. If I were
> doing it manually I could just go to File/Send To/Mail Recipient option
> and everything takes care of itself.
>
> Is there VBA code that will simply allow me to execute that command?
sswilcox - 25 Oct 2006 18:48 GMT
Thanks for taking the time to reply Ken. I appreciate it.

This isn't quite what I'm looking for. It sends the entire workbook,
whereas I am wanting to send only the active worksheet. I browsed for
"SendMail" in the VBA Help and Object Browser for additional info but I
don't see anything beyond what you have suggested.

S Wilcox

> Try looking up SendMail in the VBA help files or object browser.  It can
> be used like this:
[quoted text clipped - 11 lines]
> >
> > Is there VBA code that will simply allow me to execute that command?
Ron de Bruin - 25 Oct 2006 18:55 GMT
Hi sswilcox

You can use sendmail if you want but can't give the file a normal name

Sub Mail_ActiveSheet()
   Dim wb As Workbook
   Application.ScreenUpdating = False
   ActiveSheet.Copy
   Set wb = ActiveWorkbook
   With wb
       .SendMail "ron@debruin.nl", _
                 "This is the Subject line"
       .Close False
   End With
   Application.ScreenUpdating = True
End Sub

Talk to your IT department about this

Signature

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

> Thanks for taking the time to reply Ken. I appreciate it.
>
[quoted text clipped - 20 lines]
>> >
>> > Is there VBA code that will simply allow me to execute that command?
sswilcox - 25 Oct 2006 19:35 GMT
Thanks Ron. I should have posted this problem months ago when it first
reared it's nasty head.

This code is so close. It sends the worksheet perfectly when run from
my own PC. However, it still sends the entire workbook when run from
the document management intranet location.

S Wilcox

> Hi sswilcox
>
[quoted text clipped - 43 lines]
> >> >
> >> > Is there VBA code that will simply allow me to execute that command?
Ron de Bruin - 25 Oct 2006 19:41 GMT
Very Strange

The macro not saving anything it only send the activeworkbook
and that is on that moment the workbook with only your activesheet

>> Talk to your IT department about this

Signature

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

> Thanks Ron. I should have posted this problem months ago when it first
> reared it's nasty head.
[quoted text clipped - 52 lines]
>> >> >
>> >> > Is there VBA code that will simply allow me to execute that command?
GA - 29 Oct 2006 10:35 GMT
[snip]
>Sub Mail_ActiveSheet()
>    Dim wb As Workbook
[quoted text clipped - 8 lines]
>    Application.ScreenUpdating = True
>End Sub

This is just what I've been trying to do and it works great!

Just one bit of code is missing for my purposes and I don't know how
to do it so a bit more help would be much appreciated.

Instead of hard coding the recipient, I want to get it from another
worksheet in the same workbook so for arguments sake - the above code
is on sheet2, I want to get the recipient from cell A1 on sheet1.

Many thanks
GA
Ron de Bruin - 29 Oct 2006 13:43 GMT
Hi GA

See
http://www.rondebruin.nl/mail/tips1.htm

Signature

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

> [snip]
>>Sub Mail_ActiveSheet()
[quoted text clipped - 21 lines]
> Many thanks
> GA
GA - 29 Oct 2006 16:42 GMT
>Hi GA
>
>See
>http://www.rondebruin.nl/mail/tips1.htm

Absolutely spot on very many thanks again Ron.

GA
p.s. - your site is now bookmarked 8^)
sswilcox - 03 Nov 2006 10:52 GMT
Thanks for the help guys. I've got a temporary workaround in place
until I can get our IT dept. on board.

S Wilcox

> >Hi GA
> >
[quoted text clipped - 5 lines]
> GA
> p.s. - your site is now bookmarked 8^)
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.