D
Dean J Garrett
Hello,
We have an Access 2003 app that needs to interface to Outlook Everything is
working fine using the code snippet below, but one of the requirements is to
actually open an Outlook Send message window with the info from the
database. We can't see to find a method function to open the window. Can
anyone say how to do this? Thank you!!
Dim objOutLook As New Outlook.Application
Dim objMessage As MailItem
If Len("" & Me.txtTo) = 0 Then
MsgBox "Input a recipient"
Me.txtTo.SetFocus
Exit Sub
End If
If Len("" & Me.txtSubject) = 0 Then
MsgBox "Input a subject line"
Me.txtSubject.SetFocus
Exit Sub
End If
Set objMessage = objOutLook.CreateItem(olMailItem)
With objMessage
..To = Me.txtTo
..Subject = Me.txtSubject
..Body = Me.txtMessage
..Send
End With
Set objOutLook = Nothing
Set objMessage = Nothing
We have an Access 2003 app that needs to interface to Outlook Everything is
working fine using the code snippet below, but one of the requirements is to
actually open an Outlook Send message window with the info from the
database. We can't see to find a method function to open the window. Can
anyone say how to do this? Thank you!!
Dim objOutLook As New Outlook.Application
Dim objMessage As MailItem
If Len("" & Me.txtTo) = 0 Then
MsgBox "Input a recipient"
Me.txtTo.SetFocus
Exit Sub
End If
If Len("" & Me.txtSubject) = 0 Then
MsgBox "Input a subject line"
Me.txtSubject.SetFocus
Exit Sub
End If
Set objMessage = objOutLook.CreateItem(olMailItem)
With objMessage
..To = Me.txtTo
..Subject = Me.txtSubject
..Body = Me.txtMessage
..Send
End With
Set objOutLook = Nothing
Set objMessage = Nothing