Redemption Question

B

Bingo

The following code creates an Outlook MailItem from an
Email in the Inbox. A new MailItem is created off it by
the method Forward. The new MailItem is then saved and
re-cycled. A Redemption SafeMailItem is created for each
one the MailItem. RTFBody is copied from the original
MailItem to the new MailItem. Then the new one is sent
out.

This error is generated from Outlook if the Send method
is called on the MailItem:

"a failure may have corrupted the content of the item.
copy the content to a new item,
or save the item as a text file or RTF file" and the code
is 8004011B.

And this error is generated from Redemption if the Send
method is called on the SafeMailItem:

"Method 'Update' not support by automation object" and
the code is 8000FFFF.

The redemption has been renamed and the new DLL is
currently registered. How to solve this problem?
Thanks.


Set oMapiMailNew = oMapiMail.Forward
oMapiMailNew.Subject = oMapiMail.Subject

oMapiMailNew.Save
sMailID = oMapiMailNew.EntryID

Set oMapiMailNew = Nothing
Set oMapiMailNew = oNsp.GetItemFromID(sMailID)

Set oRdpMail = CreateObject
("CudaEmailPatch.CudaSafeMailItem")
Set oRdpMailNew = CreateObject
("CudaEmailPatch.CudaSafeMailItem")

oRdpMail.Item = oMapiMail
oRdpMailNew.Item = oMapiMailNew

Set oMapiRecipients = oRdpMailNew.Recipients

Set oMapiRecipient = oMapiRecipients.Add("Bingo")
oMapiRecipient.Resolve
oMapiRecipient.Type = 1

oRdpMailNew.RTFBody = oRdpMail.RTFBody

oMapiMailNew.Send
'oRdpMailNew.Send
 
D

Dmitry Streblechenko \(MVP\)

Works just fine here. I ran the following script in OutlookSpy (select the
message that you want to forward, click the Item button, go to the Script
tab, paste the script, click Run)

set oMapiMail = MailItem
Set oMapiMailNew = oMapiMail.Forward
oMapiMailNew.Subject = oMapiMail.Subject

oMapiMailNew.Save
sMailID = oMapiMailNew.EntryID

Set oMapiMailNew = Nothing
Set oMapiMailNew = Application.Session.GetItemFromID(sMailID)

Set oRdpMail = CreateObject("Redemption.SafeMailItem")
Set oRdpMailNew = CreateObject("Redemption.SafeMailItem")

oRdpMail.Item = oMapiMail
oRdpMailNew.Item = oMapiMailNew

Set oMapiRecipients = oRdpMailNew.Recipients

Set oMapiRecipient = oMapiRecipients.Add("dmitry")
oMapiRecipient.Resolve
oMapiRecipient.Type = 1

oRdpMailNew.RTFBody = oRdpMail.RTFBody

'oMapiMailNew.Send
oRdpMailNew.Send

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
 
B

Bingo

It turned out if the message body of an email is empty,
RTFBody copy generates the error. Now I'm checking if
it's empty and everything is working. Thanks!
 
D

Dmitry Streblechenko \(MVP\)

Do you mean empty as in RTFBody property comes up empty or as in some RTF
tags come up, but there is no real text?

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
 
B

Bingo

If the email does not have anything in the body, RTFBody
is VbNullString, no RTF tags.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top