S
Song
Vista, A2007
Following sub used to work in .accde but not now. Now it only works in
..accdb I searched and it says something about VB 5 or 6 which I don't have.
The error message is in the this subject. Can anyone help? Thanks.
Private Sub cmdOutlook_Click()
If Me.Dirty Then
Me.Dirty = False
End If
Dim olApp As Outlook.Application
Dim objMail As Outlook.MailItem
Dim ctlBody As String
Set olApp = Outlook.Application
Set objMail = olApp.CreateItem(olMailItem)
ctlBody = "Dear " & IIf([Sex] = "M", "Mr. ", "Ms. ") & StrConv([FirstName],
3) & " " & IIf(IsNull([M]), "", [M] & ". ") & StrConv([LastName], 3) & ","
With objMail
..To = Me.Email
..BodyFormat = olFormatHTML
..HTMLBody = "<HTML><BODY>" & ctlBody & "</p></BODY></HTML>"
..Display
End With
Set objMail = Nothing
Set olApp = Nothing
End Sub
Following sub used to work in .accde but not now. Now it only works in
..accdb I searched and it says something about VB 5 or 6 which I don't have.
The error message is in the this subject. Can anyone help? Thanks.
Private Sub cmdOutlook_Click()
If Me.Dirty Then
Me.Dirty = False
End If
Dim olApp As Outlook.Application
Dim objMail As Outlook.MailItem
Dim ctlBody As String
Set olApp = Outlook.Application
Set objMail = olApp.CreateItem(olMailItem)
ctlBody = "Dear " & IIf([Sex] = "M", "Mr. ", "Ms. ") & StrConv([FirstName],
3) & " " & IIf(IsNull([M]), "", [M] & ". ") & StrConv([LastName], 3) & ","
With objMail
..To = Me.Email
..BodyFormat = olFormatHTML
..HTMLBody = "<HTML><BODY>" & ctlBody & "</p></BODY></HTML>"
..Display
End With
Set objMail = Nothing
Set olApp = Nothing
End Sub