![]() |
Send email
Sub Mail_workbook_KI()
Dim OutApp As Outlook.Application Dim OutMail As Outlook.MailItem Dayrep = InputBox("Enter no. day of report.", Default:="0") Set OutApp = CreateObject("Outlook.Application") Set OutMail = OutApp.CreateItem(olMailItem) With OutMail .To = " .CC = "" .BCC = "" .Subject = Dayrep & "Day Revenue Report" .Body = "'Please find attached the ' & dayrep & ' day report '" .Attachments.Add ActiveWorkbook.FullName 'You can add other files also like this '.Attachments.Add ("C:\test.txt") .Send 'or use .Display End With Set OutMail = Nothing Set OutApp = Nothing End Sub Having problem with the body message - want it to read: 'Please find attached the 10 day report - if Dayrep=10 Can anybody help pls |
Send email
Hi al007
.Body = "Please find attached the " & dayrep & " day report" -- Regards Ron de Bruin http://www.rondebruin.nl "al007" wrote in message oups.com... Sub Mail_workbook_KI() Dim OutApp As Outlook.Application Dim OutMail As Outlook.MailItem Dayrep = InputBox("Enter no. day of report.", Default:="0") Set OutApp = CreateObject("Outlook.Application") Set OutMail = OutApp.CreateItem(olMailItem) With OutMail .To = " .CC = "" .BCC = "" .Subject = Dayrep & "Day Revenue Report" .Body = "'Please find attached the ' & dayrep & ' day report '" .Attachments.Add ActiveWorkbook.FullName 'You can add other files also like this '.Attachments.Add ("C:\test.txt") .Send 'or use .Display End With Set OutMail = Nothing Set OutApp = Nothing End Sub Having problem with the body message - want it to read: 'Please find attached the 10 day report - if Dayrep=10 Can anybody help pls |
Send email
hi ron:
ever come up with a way to use outlook express? -- Gary "Ron de Bruin" wrote in message ... Hi al007 .Body = "Please find attached the " & dayrep & " day report" -- Regards Ron de Bruin http://www.rondebruin.nl "al007" wrote in message oups.com... Sub Mail_workbook_KI() Dim OutApp As Outlook.Application Dim OutMail As Outlook.MailItem Dayrep = InputBox("Enter no. day of report.", Default:="0") Set OutApp = CreateObject("Outlook.Application") Set OutMail = OutApp.CreateItem(olMailItem) With OutMail .To = " .CC = "" .BCC = "" .Subject = Dayrep & "Day Revenue Report" .Body = "'Please find attached the ' & dayrep & ' day report '" .Attachments.Add ActiveWorkbook.FullName 'You can add other files also like this '.Attachments.Add ("C:\test.txt") .Send 'or use .Display End With Set OutMail = Nothing Set OutApp = Nothing End Sub Having problem with the body message - want it to read: 'Please find attached the 10 day report - if Dayrep=10 Can anybody help pls |
Send email
Hi Gary
Yes, but no Attachment http://www.rondebruin.nl/mail/oebody.htm But CDO is also a option because it not use a mail program http://www.rondebruin.nl/cdo.htm -- Regards Ron de Bruin http://www.rondebruin.nl "Gary Keramidas" <GKeramidasATmsn.com wrote in message ... hi ron: ever come up with a way to use outlook express? -- Gary "Ron de Bruin" wrote in message ... Hi al007 .Body = "Please find attached the " & dayrep & " day report" -- Regards Ron de Bruin http://www.rondebruin.nl "al007" wrote in message oups.com... Sub Mail_workbook_KI() Dim OutApp As Outlook.Application Dim OutMail As Outlook.MailItem Dayrep = InputBox("Enter no. day of report.", Default:="0") Set OutApp = CreateObject("Outlook.Application") Set OutMail = OutApp.CreateItem(olMailItem) With OutMail .To = " .CC = "" .BCC = "" .Subject = Dayrep & "Day Revenue Report" .Body = "'Please find attached the ' & dayrep & ' day report '" .Attachments.Add ActiveWorkbook.FullName 'You can add other files also like this '.Attachments.Add ("C:\test.txt") .Send 'or use .Display End With Set OutMail = Nothing Set OutApp = Nothing End Sub Having problem with the body message - want it to read: 'Please find attached the 10 day report - if Dayrep=10 Can anybody help pls |
Send email
that's fine, i would just like to send an email to 4 or 5 users with a subject
line and nothing else, not even any body content. -- Gary "Ron de Bruin" wrote in message ... Hi Gary Yes, but no Attachment http://www.rondebruin.nl/mail/oebody.htm But CDO is also a option because it not use a mail program http://www.rondebruin.nl/cdo.htm -- Regards Ron de Bruin http://www.rondebruin.nl "Gary Keramidas" <GKeramidasATmsn.com wrote in message ... hi ron: ever come up with a way to use outlook express? -- Gary "Ron de Bruin" wrote in message ... Hi al007 .Body = "Please find attached the " & dayrep & " day report" -- Regards Ron de Bruin http://www.rondebruin.nl "al007" wrote in message oups.com... Sub Mail_workbook_KI() Dim OutApp As Outlook.Application Dim OutMail As Outlook.MailItem Dayrep = InputBox("Enter no. day of report.", Default:="0") Set OutApp = CreateObject("Outlook.Application") Set OutMail = OutApp.CreateItem(olMailItem) With OutMail .To = " .CC = "" .BCC = "" .Subject = Dayrep & "Day Revenue Report" .Body = "'Please find attached the ' & dayrep & ' day report '" .Attachments.Add ActiveWorkbook.FullName 'You can add other files also like this '.Attachments.Add ("C:\test.txt") .Send 'or use .Display End With Set OutMail = Nothing Set OutApp = Nothing End Sub Having problem with the body message - want it to read: 'Please find attached the 10 day report - if Dayrep=10 Can anybody help pls |
Send email
hi ron:
think i got what i need from example 2, thanks. ps i took your email address out<g -- Gary "Ron de Bruin" wrote in message ... Hi Gary Yes, but no Attachment http://www.rondebruin.nl/mail/oebody.htm But CDO is also a option because it not use a mail program http://www.rondebruin.nl/cdo.htm -- Regards Ron de Bruin http://www.rondebruin.nl "Gary Keramidas" <GKeramidasATmsn.com wrote in message ... hi ron: ever come up with a way to use outlook express? -- Gary "Ron de Bruin" wrote in message ... Hi al007 .Body = "Please find attached the " & dayrep & " day report" -- Regards Ron de Bruin http://www.rondebruin.nl "al007" wrote in message oups.com... Sub Mail_workbook_KI() Dim OutApp As Outlook.Application Dim OutMail As Outlook.MailItem Dayrep = InputBox("Enter no. day of report.", Default:="0") Set OutApp = CreateObject("Outlook.Application") Set OutMail = OutApp.CreateItem(olMailItem) With OutMail .To = " .CC = "" .BCC = "" .Subject = Dayrep & "Day Revenue Report" .Body = "'Please find attached the ' & dayrep & ' day report '" .Attachments.Add ActiveWorkbook.FullName 'You can add other files also like this '.Attachments.Add ("C:\test.txt") .Send 'or use .Display End With Set OutMail = Nothing Set OutApp = Nothing End Sub Having problem with the body message - want it to read: 'Please find attached the 10 day report - if Dayrep=10 Can anybody help pls |
Send email
ps i took your email address out<g
Not from me <g -- Regards Ron de Bruin http://www.rondebruin.nl "Gary Keramidas" <GKeramidasATmsn.com wrote in message ... hi ron: think i got what i need from example 2, thanks. ps i took your email address out<g -- Gary "Ron de Bruin" wrote in message ... Hi Gary Yes, but no Attachment http://www.rondebruin.nl/mail/oebody.htm But CDO is also a option because it not use a mail program http://www.rondebruin.nl/cdo.htm -- Regards Ron de Bruin http://www.rondebruin.nl "Gary Keramidas" <GKeramidasATmsn.com wrote in message ... hi ron: ever come up with a way to use outlook express? -- Gary "Ron de Bruin" wrote in message ... Hi al007 .Body = "Please find attached the " & dayrep & " day report" -- Regards Ron de Bruin http://www.rondebruin.nl "al007" wrote in message oups.com... Sub Mail_workbook_KI() Dim OutApp As Outlook.Application Dim OutMail As Outlook.MailItem Dayrep = InputBox("Enter no. day of report.", Default:="0") Set OutApp = CreateObject("Outlook.Application") Set OutMail = OutApp.CreateItem(olMailItem) With OutMail .To = " .CC = "" .BCC = "" .Subject = Dayrep & "Day Revenue Report" .Body = "'Please find attached the ' & dayrep & ' day report '" .Attachments.Add ActiveWorkbook.FullName 'You can add other files also like this '.Attachments.Add ("C:\test.txt") .Send 'or use .Display End With Set OutMail = Nothing Set OutApp = Nothing End Sub Having problem with the body message - want it to read: 'Please find attached the 10 day report - if Dayrep=10 Can anybody help pls |
All times are GMT +1. The time now is 01:10 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com