![]() |
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. |
|
|
Thread Tools | Search this Thread | Display Modes |
#1
|
|||
|
|||
![]()
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
|
|||
|
|||
![]() 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
|
|||
|
|||
![]()
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
|
|||
|
|||
![]()
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
|
|||
|
|||
![]()
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
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
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 |