A Microsoft Outlook email forum. Outlook Banter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » Outlook Banter forum » Microsoft Outlook Email Newsgroups » Outlook and VBA
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

GAL.ResolveName issue with REDEMPTION



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old May 21st 09, 05:02 PM posted to microsoft.public.outlook.program_vba
AVIS
external usenet poster
 
Posts: 17
Default GAL.ResolveName issue with REDEMPTION

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
  #2  
Old May 21st 09, 06:43 PM posted to microsoft.public.outlook.program_vba
Michael Bauer [MVP - Outlook]
external usenet poster
 
Posts: 1,885
Default GAL.ResolveName issue with REDEMPTION



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 - MVP Outlook

: Outlook Categories? Category Manager Is Your Tool
: VBOffice Reporter for Data Analysis & Reporting
: http://www.vboffice.net/product.html?pub=6&lang=en


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

  #3  
Old May 21st 09, 10:21 PM posted to microsoft.public.outlook.program_vba
Karl Timmermans
external usenet poster
 
Posts: 789
Default GAL.ResolveName issue with REDEMPTION

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







  #4  
Old May 22nd 09, 04:10 PM posted to microsoft.public.outlook.program_vba
AVIS
external usenet poster
 
Posts: 17
Default GAL.ResolveName issue with REDEMPTION

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








  #5  
Old May 22nd 09, 07:14 PM posted to microsoft.public.outlook.program_vba
Karl Timmermans
external usenet poster
 
Posts: 789
Default GAL.ResolveName issue with REDEMPTION

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

__________________________________________________ _
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 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










  #6  
Old May 24th 09, 10: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










 




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
IAddrBook::ResolveName() problems Sergeichik Add-ins for Outlook 5 December 11th 08 06:07 PM
Outlook 2007 issue on Windows Vista - Exchange connection issue NA[_2_] Outlook - Installation 5 September 3rd 08 08:28 AM
using redemption VBS krazymike[_2_] Outlook and VBA 2 May 31st 08 12:40 AM
Redemption Issue DG Outlook and VBA 1 November 10th 07 06:31 PM
Suspect Redemption Library Issue??? Tom at GSD Add-ins for Outlook 6 March 29th 07 10:11 PM


All times are GMT +1. The time now is 08:24 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2025 Outlook Banter.
The comments are property of their posters.