View Single Post
  #2  
Old October 24th 07, 12:52 AM posted to microsoft.public.outlook.program_addins
Dmitry Streblechenko
external usenet poster
 
Posts: 2,116
Default Error 0 with Redemption...huh?

Which line exactly returns an error?
What does RDOSession do? Why do you create that object?

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

"Dewey" wrote in message
...
Hi
I have a COM add-in I've been developing for a while that was working
great...up until I changed some things and lost track of all the changes.
Unfortunately, I'm not using version control, and I don't remember all of
the
things I did. I'm not getting any compiler errors, but when I go to send
an
email with the add-in, which uses Redemption in Outlook, I get an error
with
a code of 0, trapped by the error handler in my code. What is an error
with
a code of 0? Doesn't that mean "no error?" For some reason, there's a
problem there, but I'm not sure why.

The only other odd thing is that I have an "Imports MSMAPI" statement at
the top of my code that the compiler reports is now now able to be
found...I'm not sure if the two issues are related though.


Here's my code. Thanks for any help!:



Public Sub SendMail(ByVal mode As String)


'create a redemption session and log on
Dim Session As Redemption.RDOSession
Session = CreateObject("Redemption.RDOSession")
Session.Logon()


Dim omsg1 As Outlook.MailItem
Dim msg1 As New Redemption.SafeMailItem


'Create the object needed for the message:
omsg1 = m_olApp.CreateItem(OlItemType.olMailItem)

omsg1.BodyFormat = OlBodyFormat.olFormatHTML
omsg1.HTMLBody = pre_boarding1_body_html
omsg1.Subject = "Welcome!"

'Assign the message's soul to Redemption
msg1.Item = omsg1


With msg1
")

.Send()
msg1 = Nothing
omsg1 = Nothing
End With


'If CDate(txtStartDate.Text) Now Then
m_olMailItem.DeferredDeliveryTime = CDate(txtStartDate.Text)


Return

Mailing_Error:
MsgBox("Error " & Err.Number & " while sending mail" & vbCrLf &
Err.Source)

End Sub



Ads