Hi,
I have a module in my A2K database for Outlook functions. I have a report based on a query. I would like to be able to view the report, push a button and have the report first: convert to an rtf file, and then insert itself in the created MailItem. Can someone give me a clue?
Public Function Welcome()
Dim db As Database
Dim recprog As Recordset
Dim appol As New Outlook.Application
Dim appmess As MailItem
Dim strletterOne As String
Set db = CurrentDb
Set recprog = db.OpenRecordset("BookingSheetQuery")
Dim appwd As New Word.Application
Dim appdoc As Word.Document
strletterOne = "Dear " & recprog("Dear:") & ", " & _
vbCrLf & vbCrLf & _
"We have contacted your facilitator and have arranged to schedule your program as you requested. etc "
Set appmess = appol.CreateItem(olMailItem)
With appmess
.To = recprog("ParticipantEMail")
.Subject = "Your Cross-Cultural Training Program"
.Body = strletterOne
.Display
End With
End Function
Much appreciated!!!
I have a module in my A2K database for Outlook functions. I have a report based on a query. I would like to be able to view the report, push a button and have the report first: convert to an rtf file, and then insert itself in the created MailItem. Can someone give me a clue?
Public Function Welcome()
Dim db As Database
Dim recprog As Recordset
Dim appol As New Outlook.Application
Dim appmess As MailItem
Dim strletterOne As String
Set db = CurrentDb
Set recprog = db.OpenRecordset("BookingSheetQuery")
Dim appwd As New Word.Application
Dim appdoc As Word.Document
strletterOne = "Dear " & recprog("Dear:") & ", " & _
vbCrLf & vbCrLf & _
"We have contacted your facilitator and have arranged to schedule your program as you requested. etc "
Set appmess = appol.CreateItem(olMailItem)
With appmess
.To = recprog("ParticipantEMail")
.Subject = "Your Cross-Cultural Training Program"
.Body = strletterOne
.Display
End With
End Function
Much appreciated!!!