Redemption trouble shooting

D

Dave Woods

Hi,

I'm trying to make a simple COM addin for outlook 2000 and XP in VB6
and I'm using Redemption to get round the macro security for these
versions. However I'm having a problem with my code and/or using
Redemption properly. My code is as follows:

Set objExplorer = Outlook.ActiveExplorer
Set objMailitem = CreateObject("Redemption.SafeMailItem")

For Each objMailitem In objExplorer.Selection

With objMailitem.Forward
.Recipients.Add "(e-mail address removed)"
.Recipients.Add "(e-mail address removed)"
varOriginalBody = .Body
.Body = "ADDASSPAM" & vbCr & varOriginalBody
.Send
End With
objMailitem.Delete
Next

Set Utils = CreateObject("Redemption.MAPIUtils")
Utils.Cleanup


This works in that it sends the forwaded email as intended but I still
get the Warning message up everytime I click the button to activate
the above code. I've made sure that I've got redemption selected in
the References of my VB6 project and it compiles the dll fine.

The thing I can't figure out though is that if I don't click either
the Enable or Disbale buttons in Outlook 2000 the message is sent
while the dialogue box is still waiting. This indicates to me that
redemption is working and something else is trigering the macro
warning in my code?

Any suggestions/help/advice would be gratefuully recieved.

Regards,
Dave
 
K

Ken Slovak - [MVP - Outlook]

Try using Outlook MailItems in your For Each loop and within the loop
assign the MailItem to objMailitem.Item :

Dim objMail As Outlook.MailItem

For Each objMail In objExplorer.Selection
objMailitem.Item = objMail
 

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