MrExcel Publishing
Your One Stop for Excel Tips & Solutions

Send To Mail Recipient Office 2000


Posted by Flavio on January 11, 2002 8:41 AM

Hi!
I´d like to know how I use the Sent to Mail Recepient in Office 2000...
I want to do that because I send a spreadsheet to some of the company employees and not all computers have excel.
Doing this the spreadsheet will look like an image file... And the ones who have excel don´t need to load the program just to view it or print it!

I know that I can install Excel Viewer in the other computers but it would be much better if I could send as I told....
I tried to record a macro using this command but it doesn´t recognize when you are doing the steps and the macro stays blank!

Help me!

Thanks!!!


Posted by Joe Was on January 11, 2002 1:13 PM

If your sheets are small, about 13 columns or less, as most mail programs will cut off the columns beyond this. You can do a screen print to Paint then import the image into your document. If you select a region of your sheet the screen print will only capture your selected area, otherwise you get the whole window.

If you send the file as an attachment then each user will need Excel as the viewer will not run macros. If thats not a problem then install the viewer.

You can embed an Excel sheet into an E-Mail document, in doing so it is converted to html, but the sending system must have Excel 2000 or better! Also the Microsoft Mail Manager setup on a networked system could be dificult. Here is some code to get you started? JSW

Sub SendSheet()
'By: Joe Was, 1/11/2002
'Sends a copy of each sheet hard coded, as email.
'Note to work the PC system needs a MSMail server,
'configured with a valid user profile. Or, other
'way of interacting with the application - mail -
'server, for your system.

'Add first sheet name below!
Sheet1.Copy
Application.Dialogs(xlDialogSendMail).Show

'Add second sheet name below!
Sheet2.Copy
Application.Dialogs(xlDialogSendMail).Show
'Copy and insert additional blocks as needed.

'Close the Workbook (Forms) without saving.
'To Close the Workbook and Save it Change,
'"False" below to "True"
ActiveWorkbook.Close SaveChanges:=False
ActiveWorkbook.Close SaveChanges:=False
End Sub

Sub MailerCK()
'This checks what mailer is installed on your system.

Select Case Application.MailSystem
Case xlMAPI
MsgBox "Mail system is: Microsoft Mail."
Case xlPowerTalk
MsgBox "Mail system is: PowerTalk."
Case xlNoMailSystem
MsgBox "No mail system installed!"
End Select
End Sub

Sub MailWB()
'Mail Sheet directly to the named recipient.

ActiveWorkbook.SendMail Recipients:="the system name like,John Doe inplace of all this, between the quotes."
End Sub


Sub LoggOnMail()
'Check if mail system is logged on.

If IsNull(Application.MailSession) Then
MsgBox "No Mail Session!" & Chr(13) & Chr(13) & "Will Logg On, Now!"
Application.MailLogon
Else
MsgBox "Active Mail Session!" & Chr(13) & Chr(13) & "Found!"
End If
End Sub