GAL.ResolveName issue with REDEMPTION

Status
Not open for further replies.
Q

QVZJUw

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
 
You might want to improve your error handling as a Debug.Print is useful

only the IDE. For instance, show a message box with the MsgBox function, or

write the error message into a file.

If that's done, you can see what the error message is; and if you use line

numbers and the Erl function, you can also see on which line the error

occurs.

Best regards

Michael Bauer

Am Thu, 21 May 2009 08:02:04 -0700 schrieb AVIS:


> 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
 
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 re: 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

_____________

ContactGenie - Importer 1.3 / DataPorter 2.0 / Exporter

"Power contact importers/exporters for MS Outlook '2000/2007"

"AVIS" <AVIS> wrote in message

news:1D5A3DA0-6A9E-4A52-8DF7-8B0DD395B40B@microsoft.com...
> 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
 
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 re: 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
> _____________
>

> ContactGenie - Importer 1.3 / DataPorter 2.0 / Exporter
> "Power contact importers/exporters for MS Outlook '2000/2007"
>

> "AVIS" <AVIS> wrote in message
> news:1D5A3DA0-6A9E-4A52-8DF7-8B0DD395B40B@microsoft.com...
> > 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


>
 
Don't have an answer as to why this would be specific to O'2007 other then

it possibly being related to the Redemption version in use.

Redemption 4.5.0.812 is a Dec'2007 release and the current public version

that's available for download is 4.7.0.1026 (Feb '2009). Doing a quick test

of your code snip using O'2007 with a current version of Redemption worked

exactly as expected with no error encountered resolving a valid Exch member

name so you may want to try this with an updated version of Redemption to

see if the problem persists.

Karl

_____________

ContactGenie - Importer 1.3 / DataPorter 2.0 / Exporter

"Power contact importers/exporters for MS Outlook '2000/2007"

"AVIS" <AVIS> wrote in message

news:48826700-2E37-41D8-B2D9-415548BD4666@microsoft.com...
> 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 re: 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
> > _____________
> >

> > ContactGenie - Importer 1.3 / DataPorter 2.0 / Exporter
> > "Power contact importers/exporters for MS Outlook '2000/2007"
> >

>

>
>
>> "AVIS" <AVIS> wrote in message
> > news:1D5A3DA0-6A9E-4A52-8DF7-8B0DD395B40B@microsoft.com...
> > > 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

>

>
>
>
>
>
>>
 
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)

-

"AVIS" <AVIS> wrote in message

news:48826700-2E37-41D8-B2D9-415548BD4666@microsoft.com...
> 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 re: 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
> > _____________
> >

> > ContactGenie - Importer 1.3 / DataPorter 2.0 / Exporter
> > "Power contact importers/exporters for MS Outlook '2000/2007"
> >

>

>
>
>> "AVIS" <AVIS> wrote in message
> > news:1D5A3DA0-6A9E-4A52-8DF7-8B0DD395B40B@microsoft.com...
> > > 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

>

>
>
>
>
>
>>
 
Status
Not open for further replies.
Similar threads
Thread starter Title Forum Replies Date
S Outlook mail adressing stops after first match in GAL Using Outlook 0
E GAL Attributes to Contacts Using Outlook 0
E Customer wants a portion of GAL from exchange to sync down to Android contacts via Activesync Using Outlook 2
M Retrieve data from GAL and put it in Clipboard Using Outlook 1
marcadamcarter Interrogate Outlook GAL with PowerShell Using Outlook 0
J Blank GAL in OAB Exchange Server Administration 1
S Searching contacts across GAL and local address book at same time Using Outlook 1
S Newly added user doesn't show up in GAL but available in OWA, Using Outlook 0
S Script to parse email subject, get Username, look up in GAL and redirect email Exchange Server Administration 6
S Pushing GAL to a public folder Exchange Server Administration 2
P Email Header/People pane/contact card - GAL photo vs. contact photo Using Outlook 7
A Managing GAL via OWA Exchange Server Administration 5
A How to disable bcc option in GAL - Address Book - Exchange 2007 Exchange Server Administration 4
O VSTO - Outlook Add-In - Get GAL data Outlook VBA and Custom Forms 1
G GAL program acces in outlook 2007 Outlook VBA and Custom Forms 2
C Problem while converting GAL entries to contacts in Outlook Cont Outlook VBA and Custom Forms 5
mrrobski68 Issue with Find messages in a conversation macro Outlook VBA and Custom Forms 1
H Outlook 365 issue getting details from embedded files, crashing routine Outlook VBA and Custom Forms 0
O Mail rule issue Using Outlook 3
D Auto Remove [EXTERNAL] from subject - Issue with Macro Using Outlook 21
Commodore Safe way to add or update holidays; Windows Notifications issue Using Outlook 8
e_a_g_l_e_p_i Gmail in Outlook 2010 preview issue Using Outlook 4
M Issue transferring Outlook 2016 email accounts & settings onto new computer Using Outlook 8
P Forwarding emails issue with special characters replacing text body Using Outlook 1
S Excel VBA and shared calendar issue Outlook VBA and Custom Forms 3
A Clipboard Resize Issue Using Outlook 7
J O365 - Adding Shared Google Calendar ICS link issue in O365 Using Outlook 0
P Outlook 2013 "Item could not be moved - still an issue for Outlook 2013 Using Outlook 0
E Mail sorting view issue Using Outlook 1
D hide messege issue Using Outlook 1
B Outllok 2007 License Expired issue Using Outlook 0
ManaarZakaria I'm afraid of this issue, cause of strange error Exchange Server Administration 2
e_a_g_l_e_p_i Another reinstall of Outlook 2010 issue Using Outlook 10
Justo Horrillo Issue with rules in Outlook 2010 Using Outlook 4
G Icloud Contacts With Outlook Issue Using Outlook 4
J Outlook.com Contact Sync Issue Using Outlook.com accounts in Outlook 9
M Calendar Time Zone issue Using Outlook 0
B My outlook calendar edit issue Outlook VBA and Custom Forms 0
D Unusual calendar issue Exchange Server Administration 0
D Multiple Accounts Issue Receiving Emails in 2016 Using Outlook 0
B Winmail.dat Issue Using Outlook.com accounts in Outlook 0
tswatek Issue with where Outlook saves new contacts Using Outlook 3
K Outlook with MDaemon Connectivity Issue Using Outlook 4
G .ost file corrupted / solved the issue with some posts already said, but .ost file is corrupted agai Using Outlook 2
D Resizing issue for message field Outlook VBA and Custom Forms 0
P Outlook hanging issue Using Outlook 0
K Outlook 2013 calendar issue with Outlook.com Using Outlook.com accounts in Outlook 2
J Favorites in Public Folders issue Outlook VBA and Custom Forms 0
K Insert screenshots issue Using Outlook 2
T issue changing [Type] in dbo.ContactMainTable/ contacts seem to be deleted BCM (Business Contact Manager) 5

Similar threads

Back
Top