Hi All,
I have a function that creates and email in Outlook but I want to add a ‘Top 10’ list to the email body.
The data will come from a query.
This is my ‘create email’ function but I have no idea how to add the query result to the body.
If any one can help that’d be great.
Thanks
I have a function that creates and email in Outlook but I want to add a ‘Top 10’ list to the email body.
The data will come from a query.
This is my ‘create email’ function but I have no idea how to add the query result to the body.
If any one can help that’d be great.
Thanks
Code:
[/FONT][/COLOR]
[SIZE=3][COLOR=#000080][FONT=Arial]UserNME = "MyName" [/FONT][/COLOR][/SIZE]
[SIZE=3][COLOR=#000080][FONT=Arial]Set FSO = New FileSystemObject[/FONT][/COLOR][/SIZE]
[SIZE=3][COLOR=#000080][FONT=Arial]Subjectline = “My Subject"[/FONT][/COLOR][/SIZE]
[SIZE=3][COLOR=#000080][FONT=Arial]MyBodyText = "Dear My email body”[/FONT][/COLOR][/SIZE]
[SIZE=3][COLOR=#000080][FONT=Arial]Set MyOutlook = New Outlook.Application[/FONT][/COLOR][/SIZE]
[SIZE=3][COLOR=#000080][FONT=Arial]Set DB = CurrentDb()[/FONT][/COLOR][/SIZE]
[SIZE=3][COLOR=#000080][FONT=Arial]Set MyMail = MyOutlook.CreateItem(olMailItem)[/FONT][/COLOR][/SIZE]
[SIZE=3][COLOR=#000080][FONT=Arial]MyMail.To = "Email@Address"[/FONT][/COLOR][/SIZE]
[SIZE=3][COLOR=#000080][FONT=Arial]MyMail.Subject = Subjectline[/FONT][/COLOR][/SIZE]
[SIZE=3][COLOR=#000080][FONT=Arial]MyMail.Body = MyBodyText[/FONT][/COLOR][/SIZE]
[SIZE=3][COLOR=#000080][FONT=Arial]MyMail.Display[/FONT][/COLOR][/SIZE]
[SIZE=3][COLOR=#000080][FONT=Arial]Set MyMail = Nothing[/FONT][/COLOR][/SIZE]
[SIZE=3][COLOR=#000080][FONT=Arial]Set MyOutlook = Nothing[/FONT][/COLOR][/SIZE]
[SIZE=3][COLOR=#000080][FONT=Arial]Set MailList = Nothing[/FONT][/COLOR][/SIZE]
[SIZE=3][COLOR=#000080][FONT=Arial]DB.Close[/FONT][/COLOR][/SIZE]
[SIZE=3][COLOR=#000080][FONT=Arial]Set DB = Nothing[/FONT][/COLOR][/SIZE]
[SIZE=3][COLOR=#000080][FONT=Arial]DoCmd.Hourglass False[/FONT][/COLOR][/SIZE]
[COLOR=black][FONT=Verdana]