View Single Post
  #6  
Old May 24th 09, 09:23 PM posted to microsoft.public.outlook.program_vba
Dmitry Streblechenko
external usenet poster
 
Posts: 2,116
Default GAL.ResolveName issue with REDEMPTION

Did you have a chance to try the debug version of the dll that I sent to
your private e-mail address?

--
Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
-
"AVIS" wrote in message
...
Hi,

I researched on the issue further and found that the application works
fine
with OFFICE (OUTLOOK) versions 2002 and 2003. We tried with outlook 2002
and
2003, the application and GAL.RESOLVENAME functionality was working fine,
but, when the same application was executed with OFFICE (OUTLOOK) 2007,
the
issue still persists. Can you suggest, why this problem is occuring and
if
any, the resolution for the issue.

And as far as the DEBUG.PRINT is concerned, we have a custom built logging
function, to log the errors, which I had replaced in the code, with the
DEBUG.PRINT statements , to avoid confusions.

Thanks in advance for the help.

"Karl Timmermans" wrote:

The code snip as provided would not be the location where runtime Error
91 -
"Object variable or With block variable not set" is getting thrown. If it
occured anywhere within the 3 primary code lines - it would get trapped
by the error handler in that routine which in turn means that another
routine with no error handler is attempting to use an object that has not
been set (by your own description - you have no way of knowing for
sure where this error is coming from)

In addition to Michael's advice Error Handling - you would also be
well
advised to check to see that any object being "Set" is actually created
by
checking for "IF object IS NOTHING" (or any variation thereof)
immediately
afterwards (i.e. after Set oMessage and Set oRecipient).

Karl
__________________________________________________ _
Karl Timmermans - The Claxton Group
ContactGenie - Importer 1.3 / DataPorter 2.0 / Exporter
"Power contact importers/exporters for MS Outlook '2000/2007"
http://www.contactgenie.com



"AVIS" wrote in message
...
Hi,

I have a Visual Basic application which uses REDEMPTION dll (ver
4.5.0.812).
This application updates appointments and tasks, to the EXCHANGE SERVER
and
also sends a mail to the EXCHANGE USER, highlighting the changes to the
appointment and tasks. In one PC, the application creates the
appointments
and tasks, but fails to send a mail to the receipient. Below is the
function
where the execution fails. I feel the failure happens at the
GAL.RESOLVENAME
command. Since, only the executable is installed in the PC where the
problem
occurs, i am not able to point out which statement fails. Can somebody
help
me, to get this issue resolved.

The error message, generated by the below function is

"Object variable or With block variable not set"

Private Function RecipientIsValid(session As Redemption.RDOSession,
RecipientUserId As String) As Boolean

On Error GoTo ErrHandler
Dim oMessage As RDOMail
Dim oRecipient As RDORecipient


Set oMessage = session.GetDefaultFolder(olFolderOutbox).Items.Add
Set oRecipient = oMessage.Recipients.Add(RecipientUserId)
session.AddressBook.GAL.ResolveName (RecipientUserId)

CleanUp:
RecipientIsValid = True
Exit Function

ErrHandler:
If Err.Number = -2147219712 Then ' [Collaboration Data
Objects - [MAPI_E_AMBIGUOUS_RECIP(80040700)]]
GoTo CleanUp
Else
Debug.Print "RecipientIsValid"
Debug.Print Err.Description
End If

End Function

Thanks in advance










Ads