PC Review Forums Newsgroups Microsoft Outlook Microsoft Outlook VBA Programming CDO AddressBook Err number 424 Object required

Reply

CDO AddressBook Err number 424 Object required

 
Thread Tools Rate Thread
Old 24-02-2005, 04:08 PM   #1
sharon zadok
Guest
 
Posts: n/a
Default CDO AddressBook Err number 424 Object required


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
  Reply With Quote
Old 25-02-2005, 07:28 AM   #2
Michael Bauer
Guest
 
Posts: n/a
Default Re: CDO AddressBook Err number 424 Object required

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


  Reply With Quote
Old 25-02-2005, 01:59 PM   #3
Ken Slovak - [MVP - Outlook]
Guest
 
Posts: n/a
Default Re: CDO AddressBook Err number 424 Object required

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


  Reply With Quote
Old 27-02-2005, 07:56 AM   #4
sharon zadok
Guest
 
Posts: n/a
Default Re: CDO AddressBook Err number 424 Object required

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

  Reply With Quote
Old 27-02-2005, 09:52 AM   #5
Michael Bauer
Guest
 
Posts: n/a
Default Re: CDO AddressBook Err number 424 Object required

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


  Reply With Quote
Old 27-02-2005, 03:24 PM   #6
sharon zadok
Guest
 
Posts: n/a
Default Re: CDO AddressBook Err number 424 Object required

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
  Reply With Quote
Old 27-02-2005, 03:31 PM   #7
sharon zadok
Guest
 
Posts: n/a
Default Re: CDO AddressBook Err number 424 Object required

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.
  Reply With Quote
Old 27-02-2005, 03:56 PM   #8
Michael Bauer
Guest
 
Posts: n/a
Default Re: CDO AddressBook Err number 424 Object required

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


  Reply With Quote
Old 28-02-2005, 01:33 PM   #9
sharon zadok
Guest
 
Posts: n/a
Default Re: CDO AddressBook Err number 424 Object required

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

  Reply With Quote
Old 28-02-2005, 02:58 PM   #10
Ken Slovak - [MVP - Outlook]
Guest
 
Posts: n/a
Default Re: CDO AddressBook Err number 424 Object required

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.


  Reply With Quote
Reply



Thread Tools
Rate This Thread
Rate This Thread:

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