![]() |
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 |
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 |
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 |
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 |
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 |
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 |
All times are GMT +1. The time now is 05:08 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-2006 OutlookBanter.com