P
Peter
Private Sub Command36_Click()
On Error GoTo Error_Handler
DoCmd.SendObject
Dim varTo As Variant
Dim varCC As Variant
Dim stSubject As String
Dim objOutlook As Outlook.Application
Dim objEmail As Outlook.MailItem
Dim errLoop As Error
Set objOutlook = CreateObject("Outlook.application")
Set objEmail = objOutlook.CreateItem(olMailItem)
With objEmail
..To = Me.[Text28]
..CC = Me.[Text30]
..Subject = Me.[Text34]
End With
Exit_Here:
Set objOutlook = Nothing
Exit Sub
Error_Handler:
MsgBox Err & ": " & Err.Description
Resume Exit_Here
End Sub
On Error GoTo Error_Handler
DoCmd.SendObject
Dim varTo As Variant
Dim varCC As Variant
Dim stSubject As String
Dim objOutlook As Outlook.Application
Dim objEmail As Outlook.MailItem
Dim errLoop As Error
Set objOutlook = CreateObject("Outlook.application")
Set objEmail = objOutlook.CreateItem(olMailItem)
With objEmail
..To = Me.[Text28]
..CC = Me.[Text30]
..Subject = Me.[Text34]
End With
Exit_Here:
Set objOutlook = Nothing
Exit Sub
Error_Handler:
MsgBox Err & ": " & Err.Description
Resume Exit_Here
End Sub