Hi, I'm simply trying to add some macro code (convert macro to Visual Basic is greyed out).
I have an email VBA to create an email and I would like to add the ability to go to a field (checkbox) and set it to yes. I have the Macro set with this:
SetValue
Item =[Sent]
Expression =Yes
Here is the code I've created for the email
Private Sub Command24_Click()
Dim Msg As String
Msg = "Hello " & [Pref_First] & ",<br>" & _
" text text text.<P>"
Dim O As Outlook.Application
Dim M As Outlook.MailItem
Set O = New Outlook.Application
Set M = O.CreateItem(olMailItem)
With M
.BodyFormat = olFormatHTML
.HTMLBody = "<IMG src= C:\Users\mc900136\Documents\header.jpg width=450><br>" & Msg
.To = [Email - Primary Work]
.CC = [Manager Email]
.Subject = "Domain\Tenant Consolidation - Questionnaire Duel Account User"
.Display
End With
Set M = Nothing
Set O = Nothing
End Sub