PC Review
Forums
Newsgroups
Microsoft Outlook
Microsoft Outlook VBA Programming
CDO AddressBook Err number 424 Object required
Forums
Newsgroups
Microsoft Outlook
Microsoft Outlook VBA Programming
CDO AddressBook Err number 424 Object required
![]() |
CDO AddressBook Err number 424 Object required |
|
|
Thread Tools | Rate Thread |
|
|
#1 |
|
Guest
Posts: n/a
|
i have XP professional and office 2003SP1
this method (OLE) works well but in some cases the OLE return nothing even when i select a recipient in most cases its retun an object . sample: the OLE opend i select recipient "sharon" i get a error 424 and then 'i do the same operation and its return object. i never found any document about the this error. the login session is allready initilized in all cases Set objRecipients = cdoSession.AddressBook(, "SMS to list", , , , "SMS to", , , hwnd) 'if user canceled the selection from the If Err.Number = -2147221229 Then address book window GoTo Ex End If 'here i get error: 424 Object required If Err.Number <> 0 Then MsgBox str(Err.Number) + vbTab + Err.Description End If If objRecipients.count = 0 Then GoTo Ex End If |
|
|
|
#2 |
|
Guest
Posts: n/a
|
Hi Sharon,
I don´t know, why the same operation sometimes returns an object and sometimes it doesn´t. > 'here i get error: 424 Object required > If Err.Number <> 0 Then But I´m pretty sure that this line doesn´t cause an Error 424. -- Viele Grüße Michael Bauer "sharon zadok" <sharon.zadok@gmail.com> wrote in message news:30794d21.0502240808.27b81141@posting.google.com... > i have XP professional and office 2003SP1 > this method (OLE) works well but in some cases the OLE return nothing > even when > i select a recipient in most cases its retun an object . > > sample: > the OLE opend i select recipient "sharon" i get a error 424 and then > 'i do the same operation and its return object. > i never found any document about the this error. > the login session is allready initilized in all cases > > > > Set objRecipients = cdoSession.AddressBook(, "SMS to list", , , , > "SMS to", , , hwnd) > 'if user canceled the selection from the > If Err.Number = -2147221229 Then address book window > GoTo Ex > End If > > 'here i get error: 424 Object required > If Err.Number <> 0 Then > > MsgBox str(Err.Number) + vbTab + Err.Description > End If > > If objRecipients.count = 0 Then > GoTo Ex > End If |
|
|
|
#3 |
|
Guest
Posts: n/a
|
Is hwnd always valid and not 0? Try setting a breakpoint on the error check
line after the return from Session.AddressBook and see if the 424 is coming in there. Are you by chance using cached mode in Outlook 2003? -- Ken Slovak [MVP - Outlook] http://www.slovaktech.com Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003 Reminder Manager, Extended Reminders, Attachment Options http://www.slovaktech.com/products.htm "sharon zadok" <sharon.zadok@gmail.com> wrote in message news:30794d21.0502240808.27b81141@posting.google.com... >i have XP professional and office 2003SP1 > this method (OLE) works well but in some cases the OLE return nothing > even when > i select a recipient in most cases its retun an object . > > sample: > the OLE opend i select recipient "sharon" i get a error 424 and then > 'i do the same operation and its return object. > i never found any document about the this error. > the login session is allready initilized in all cases > > > > Set objRecipients = cdoSession.AddressBook(, "SMS to list", , , , > "SMS to", , , hwnd) > 'if user canceled the selection from the > If Err.Number = -2147221229 Then address book window > GoTo Ex > End If > > 'here i get error: 424 Object required > If Err.Number <> 0 Then > > MsgBox str(Err.Number) + vbTab + Err.Description > End If > > If objRecipients.count = 0 Then > GoTo Ex > End If |
|
|
|
#4 |
|
Guest
Posts: n/a
|
hello Michael Bauer
yes i know that the error not comes from the line i specified. its from the OLE in the cdoSession.AddressBook method if i understand you well its happens sometime to all develpers(you also) and there is no way to solve this problame,i have not seen any reffernce about this issue in all news group. regards "Michael Bauer" <mib00@t-online.de> wrote in message news:<Ouw8mGxGFHA.2360@TK2MSFTNGP12.phx.gbl>... > Hi Sharon, > > I don´t know, why the same operation sometimes returns an object and > sometimes it doesn´t. > > > 'here i get error: 424 Object required > > If Err.Number <> 0 Then > > But I´m pretty sure that this line doesn´t cause an Error 424. > > -- > Viele Grüße > Michael Bauer > > > "sharon zadok" <sharon.zadok@gmail.com> wrote in message > news:30794d21.0502240808.27b81141@posting.google.com... > > i have XP professional and office 2003SP1 > > this method (OLE) works well but in some cases the OLE return nothing > > even when > > i select a recipient in most cases its retun an object . > > > > sample: > > the OLE opend i select recipient "sharon" i get a error 424 and then > > 'i do the same operation and its return object. > > i never found any document about the this error. > > the login session is allready initilized in all cases > > > > > > > > Set objRecipients = cdoSession.AddressBook(, "SMS to list", , , , > > "SMS to", , , hwnd) > > 'if user canceled the selection from the > > If Err.Number = -2147221229 Then address book window > > GoTo Ex > > End If > > > > 'here i get error: 424 Object required > > If Err.Number <> 0 Then > > > > MsgBox str(Err.Number) + vbTab + Err.Description > > End If > > > > If objRecipients.count = 0 Then > > GoTo Ex > > End If |
|
|
|
#5 |
|
Guest
Posts: n/a
|
Hi Sharon,
no, I just said that I don´t know why. I´ve never experienced that (maybe) because I´ve never used the AddressBook method so far? Please see also Ken´s post. -- Viele Grüße Michael Bauer "sharon zadok" <sharon.zadok@gmail.com> wrote in message news:30794d21.0502262356.1e6ea62c@posting.google.com... > hello Michael Bauer > > yes i know that the error not comes from the line i specified. > its from the OLE in the cdoSession.AddressBook method > > if i understand you well its happens sometime to all develpers(you > also) > and there is no way to solve this problame,i have not seen any > reffernce about this issue in all news group. > > regards > > > > "Michael Bauer" <mib00@t-online.de> wrote in message news:<Ouw8mGxGFHA.2360@TK2MSFTNGP12.phx.gbl>... > > Hi Sharon, > > > > I don´t know, why the same operation sometimes returns an object and > > sometimes it doesn´t. > > > > > 'here i get error: 424 Object required > > > If Err.Number <> 0 Then > > > > But I´m pretty sure that this line doesn´t cause an Error 424. > > > > -- > > Viele Grüße > > Michael Bauer > > > > > > "sharon zadok" <sharon.zadok@gmail.com> wrote in message > > news:30794d21.0502240808.27b81141@posting.google.com... > > > i have XP professional and office 2003SP1 > > > this method (OLE) works well but in some cases the OLE return nothing > > > even when > > > i select a recipient in most cases its retun an object . > > > > > > sample: > > > the OLE opend i select recipient "sharon" i get a error 424 and then > > > 'i do the same operation and its return object. > > > i never found any document about the this error. > > > the login session is allready initilized in all cases > > > > > > > > > > > > Set objRecipients = cdoSession.AddressBook(, "SMS to list", , , , > > > "SMS to", , , hwnd) > > > 'if user canceled the selection from the > > > If Err.Number = -2147221229 Then address book window > > > GoTo Ex > > > End If > > > > > > 'here i get error: 424 Object required > > > If Err.Number <> 0 Then > > > > > > MsgBox str(Err.Number) + vbTab + Err.Description > > > End If > > > > > > If objRecipients.count = 0 Then > > > GoTo Ex > > > End If |
|
|
|
#6 |
|
Guest
Posts: n/a
|
hello Michael Bauer
in you question you ask if i use cache mode , yes my outlook is configured to work with cache exchange mode ill do testing without the cache exchange mode any way. thx |
|
|
|
#7 |
|
Guest
Posts: n/a
|
hello Michael Bauer
yes use cache exchange mode ,ill test my app witout the cache exchange mode any way. about ken's replys i allready searched and nothing was relevent thx. |
|
|
|
#8 |
|
Guest
Posts: n/a
|
Hi Sharon,
sorry, I also never talked about any cache mode. I think, you¡¦d need to wait for Ken... -- Viele Gruse Michael Bauer "sharon zadok" <sharon.zadok@gmail.com> wrote in message news:30794d21.0502270723.37ac354b@posting.google.com... > hello Michael Bauer > > in you question you ask if i use cache mode , > yes my outlook is configured to work with cache exchange mode > > ill do testing without the cache exchange mode any way. > > thx |
|
|
|
#9 |
|
Guest
Posts: n/a
|
hello Ken Slovak
the hwnd is alwayes not 0. i found somthing when the Addressbook is open after waiting 3 minute i select a recipient press ok and then i get the 424 error and hwnd is valid(all the time happed). but still after avrage of 10-20 recipient even i dont wait i get 424. do we know any problam of waiting while OLE(addressbook) is shown? thx i remove the cache exchange mode and still its the same. "Ken Slovak - [MVP - Outlook]" <kenslovak@mvps.org> wrote in message news:<OGdJ$L0GFHA.432@TK2MSFTNGP09.phx.gbl>... > Is hwnd always valid and not 0? Try setting a breakpoint on the error check > line after the return from Session.AddressBook and see if the 424 is coming > in there. > > Are you by chance using cached mode in Outlook 2003? > |
|
|
|
#10 |
|
Guest
Posts: n/a
|
I don't know of any problems with waiting to receive a return from
Session.AddressBook, CDO has no conception of a timeout for that. The only times I've seen Session.AddressBook fail is when using Outlook 2000 Internet only mode if certain arguments to AddressBook are specified at all, such as OneAddress. For some reason if that argument isn't skipped over CDO chokes if you are using Internet only mode in Outlook 2000. Other than that if the wrong version of CDO is installed for the corresponding version of Outlook or with an upgrade scenario if CDO isn't correctly registered I've seen things like that but in general all CDO calls would fail in that case. Some things that you might want to try are a new Outlook profile or deleting the OST file and letting Outlook re-create it. You can also see if not using hwnd (the ParentWindow argument) makes a difference. One other thing, where is this code running? Inside Outlook as a macro or COM addin or from external code that automates Outlook? Language used is VBA or VB 6? -- Ken Slovak [MVP - Outlook] http://www.slovaktech.com Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003 Reminder Manager, Extended Reminders, Attachment Options http://www.slovaktech.com/products.htm "sharon zadok" <sharon.zadok@gmail.com> wrote in message news:30794d21.0502280533.ce81cba@posting.google.com... > hello Ken Slovak > > the hwnd is alwayes not 0. > i found somthing when the Addressbook is open after waiting 3 minute i > select a recipient press ok and then i get the 424 error and hwnd is > valid(all the time happed). > but still after avrage of 10-20 recipient even i dont wait i get 424. > do we know any problam of waiting while OLE(addressbook) is shown? > > thx > > > > i remove the cache exchange mode and still its the same. |
|
![]() |
|
| Thread Tools | |
| Rate This Thread | |
|
|

Main Page 

