Body is empty when forwarding mail programmatically

  • Thread starter Thread starter Reinhard Lehner
  • Start date Start date
R

Reinhard Lehner

Hi there!

I am trying to forward mail automatically to multiple recipients in its Send
event.
All works fine - just the body of the newly generated mails is empty?!

Here the source:
rem: xRecipients is the CSV-list of the recipients.

Dim WithEvents objMail As Outlook.MailItem

Private Sub objMail_Send(Cancel As Boolean)
Dim objMailFW As Outlook.MailItem

With objMail
Set objMailFW = .Forward
objMailFW.To = xRecipients
objMailFW.Recipients.ResolveAll
objMailFW.Send
Set objMailFW = Nothing

Cancel = True
.Delete
End With

Set objMail = Nothing
End Sub

The body of the generated mail stays empty, but all other parts like
subject, attachments, ... are ok.
What's wrong?!

I am using Outlook XP on Windows XP, Visual Basic 6.0 SP5.

Thank You very much
Reinhard
 
Back
Top