R
Robert S. Grimes
I am trying to send an email, but I get this run-time error:
'Method 'Update' not supported by automation object'
Here is the code (mySel is a selection of mail items):
Dim mItem As MailItem
Dim smItem As Object
For Each mItem In MySel
If TypeName(mItem) = "MailItem" Then
If isHam Then
Set mItem = mItem.Copy
End If
Set smItem = CreateObject("Redemption.SafeMailItem")
smItem.Item = mItem
For i = 1 To smItem.Recipients.Count Step -1
smItem.Recipients.Remove (i)
Next
smItem.Recipients.Add (dest)
smItem.Recipients.ResolveAll
smItem.Send
End If
Next
As a test, I took this code from the Redemption web site, and it
works:
Public Sub Test()
Dim SafeItem, oItem
Set SafeItem = CreateObject("Redemption.SafeMailItem") 'Create an
instance of Redemption.SafeMailItem
Set oItem = Application.CreateItem(0) 'Create a new message
SafeItem.Item = oItem 'set Item property
SafeItem.Recipients.Add "(e-mail address removed)"
SafeItem.Recipients.ResolveAll
SafeItem.Subject = "Testing Redemption"
SafeItem.Send
End Sub
Anyone know what's up? Thanks!
'Method 'Update' not supported by automation object'
Here is the code (mySel is a selection of mail items):
Dim mItem As MailItem
Dim smItem As Object
For Each mItem In MySel
If TypeName(mItem) = "MailItem" Then
If isHam Then
Set mItem = mItem.Copy
End If
Set smItem = CreateObject("Redemption.SafeMailItem")
smItem.Item = mItem
For i = 1 To smItem.Recipients.Count Step -1
smItem.Recipients.Remove (i)
Next
smItem.Recipients.Add (dest)
smItem.Recipients.ResolveAll
smItem.Send
End If
Next
As a test, I took this code from the Redemption web site, and it
works:
Public Sub Test()
Dim SafeItem, oItem
Set SafeItem = CreateObject("Redemption.SafeMailItem") 'Create an
instance of Redemption.SafeMailItem
Set oItem = Application.CreateItem(0) 'Create a new message
SafeItem.Item = oItem 'set Item property
SafeItem.Recipients.Add "(e-mail address removed)"
SafeItem.Recipients.ResolveAll
SafeItem.Subject = "Testing Redemption"
SafeItem.Send
End Sub
Anyone know what's up? Thanks!