Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Using SendMail in Excel

Status
Not open for further replies.

AllenRitch

Technical User
May 20, 2003
52
US
I'm using the SendMail method in Excel to send a workbook for review then approval. The method, however, only offers three parameters (Recipients, Subject & ReturnReceipt). Is there anyway I can also send a message along with the attached workbook? Note that I'd rather not use the Route method as it seems to complicate matters with the users.

Thanks
 
Hi There - I use this sub to send mail from excel
Sub Send_Mail()
Dim myOLApp As New Outlook.Application
Dim myOLItem As Outlook.MailItem
Set myOLItem = myOLApp.CreateItem(olMailItem)
With myOLItem
.Subject = " VB Message "
.Body = "Hello - This is a test"
.To = "xxx@xxx.com" ' E-Mail Address here
.Attachments.Add ("C:\test.xls") ' File name here
.Send
End With
End Sub

Let me know how you get on.

Cheers

John
 
The spreadsheet that will be attached is actually on a web server and not a PC. Would the code above still work in this case? And if so, would the attachment being sent keep the changes the user made? Presently, the user cannot change the master spreadsheet on the server. Rather, they are sending a changed copy as an attachment.

The only problem is the SendMail method won't allow me to add a message to the body of the e-mail stating further instructions for the approver.

Thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top