L
LEH
I generate an email using VBA from an Access form that includes voting
buttons. The problem is the reply (voting response) does not include the
body of the original email sent out although the subject now includes the
voters choice. How can I enure the reply includes the text from the original
message?
Code used:
' Create the Outlook session.
Set objOutlook = CreateObject("Outlook.Application")
' Create the message.
Set objOutlookMsg = objOutlook.CreateItem(olMailItem)
With objOutlookMsg
' Add the To recipient(s) to the message.
Set objOutlookRecip = .Recipients.Add(Me!emailaddress)
objOutlookRecip.Type = olTo
' Add the CC recipient(s) to the message.
'Set objOutlookRecip = .Recipients.Add("Michael Suyama")
'objOutlookRecip.Type = olCC
' Add the BCC recipient(s) to the message.
'Set objOutlookRecip = .Recipients.Add("Andrew Fuller")
'objOutlookRecip.Type = olBCC
' Set the Subject, Body, and Importance of the message.
.Subject = "Timecard for Period Ending " & Me!Date1
.Body = strBody
.Importance = olImportanceHigh 'High importance
.VotingOptions = "Approved;Disapproved"
' retVal = Item_Send(objOutlookMsg)
' Add attachments to the message.
If Not IsMissing(AttachmentPath) Then
Set objOutlookAttach = .Attachments.Add(AttachmentPath)
End If
' Resolve each Recipient's name.
For Each objOutlookRecip In .Recipients
objOutlookRecip.Resolve
Next
.Display
' Should we display the message before sending?
'If DisplayMsg Then
' .Display
'Else
'.Save
'.Send
'End If
End With
Set objOutlook = Nothing
buttons. The problem is the reply (voting response) does not include the
body of the original email sent out although the subject now includes the
voters choice. How can I enure the reply includes the text from the original
message?
Code used:
' Create the Outlook session.
Set objOutlook = CreateObject("Outlook.Application")
' Create the message.
Set objOutlookMsg = objOutlook.CreateItem(olMailItem)
With objOutlookMsg
' Add the To recipient(s) to the message.
Set objOutlookRecip = .Recipients.Add(Me!emailaddress)
objOutlookRecip.Type = olTo
' Add the CC recipient(s) to the message.
'Set objOutlookRecip = .Recipients.Add("Michael Suyama")
'objOutlookRecip.Type = olCC
' Add the BCC recipient(s) to the message.
'Set objOutlookRecip = .Recipients.Add("Andrew Fuller")
'objOutlookRecip.Type = olBCC
' Set the Subject, Body, and Importance of the message.
.Subject = "Timecard for Period Ending " & Me!Date1
.Body = strBody
.Importance = olImportanceHigh 'High importance
.VotingOptions = "Approved;Disapproved"
' retVal = Item_Send(objOutlookMsg)
' Add attachments to the message.
If Not IsMissing(AttachmentPath) Then
Set objOutlookAttach = .Attachments.Add(AttachmentPath)
End If
' Resolve each Recipient's name.
For Each objOutlookRecip In .Recipients
objOutlookRecip.Resolve
Next
.Display
' Should we display the message before sending?
'If DisplayMsg Then
' .Display
'Else
'.Save
'.Send
'End If
End With
Set objOutlook = Nothing