Thread
:
Automatically Email Daily Reports Using Outlook.
View Single Post
#
2
January 19th 06, 07:37 AM posted to microsoft.public.outlook.program_vba
Michael Bauer
external usenet poster
Posts: 435
Automatically Email Daily Reports Using Outlook.
Am 18 Jan 2006 10:47:59 -0800 schrieb
:
1. The Date function returns the date. Additionally you could use the Format
function, e.g.: str=Format(Date, "mm/dd/yy")
2. The second question I donīt understand. Do you want to add the date to
the file name?
--
Viele Gruesse / Best regards
Michael Bauer - MVP Outlook
Our trading system automatically generates 4 reports everyday. I want
to create a macro that will automatically send those reports to the
appropriate people. Here is what I have so far:
Sub Test()
Set objOL = CreateObject("Outlook.Application")
Set objMail = objOL.CreateItem(0)
With objMail
.Subject = "Destination Details Report"
.To = "John Q. Public"
.Attachments.Add "c:\temp\TEST.txt"
.Send
End With
End Sub
I am encountering 2 problems. First, I would like the current date to
automatically fill in somewhere in Subject line. For example,
.Subject = "Destination Details Report" $mm/dd/yy$
Anyone know the correct syntax for this or if it is even possible?
Secondly, our trading system generates the filename of the report in
this format:
DestExecDetailsReport20060117.csv
As you can see, the date is automatically added to the end of the
report name. Is it possible for me to do this macro if the name of the
file I want to attach changes names everyday?
Thank you in advance for your help!
Michael Bauer
View Public Profile
View message headers
Find all posts by Michael Bauer
Find all threads started by Michael Bauer
Ads