test if mailbox exists

Joined
Sep 21, 2005
Messages
1
Reaction score
0
Hi,

I use the following to
retrieve
all email entries in a mailbox on the exchange server:

Set
MyMapiFolder
=
myNameSpace.Folders
(A_
Mailboxname
).Folders("
Inox
")

Works fine, except when A_
Mailboxname
contains a name that doesn't exist. There are two reasons for a mailbox that doesn't exists;
1) the mailbox is localized (
ie
"
Postbus
" instead of "Mailbox" (we use different servers on the corporate network). For this case I trap the generated error number (-2147221233) and replace "Mailbox" in the string with "
Postbus
".
2) The mailbox doesn't exist at all.

I need to signal this, but cannot figure out how to test this, because I can't
discriminate
the "why".
If I retry to set with the changed name ("
Postbus
" instead of "Mailbox") and this is the correct
error
reason it works fine. If not however, it jumps straight out of the function, without generating a error.

Does
anybody
know how to correctly set up this?

EasyIT





retrieve
retriever
retrieved
retrieves
reprieve
Bewerken
Terugzetten naar "retreive"
Mapifolder
Bewerken
Terugzetten naar "MyMapiFolder"
(Geen suggesties)
Bewerken
Alles negeren
Toevoegen aan woordenboek
Mailbox name
Mailbox-name
Bewerken
Terugzetten naar "Mailboxname"
In ox
In-ox
Knox
UNIX
Unix
Bewerken
Alles negeren
Toevoegen aan woordenboek
Mailbox name
Mailbox-name
Bewerken
Terugzetten naar "Mailboxname"
IE
Ir
OE
E
I
Bewerken
Alles negeren
Toevoegen aan woordenboek
Post bus
Post-bus
Posts
Postbags
Post's
Bewerken
Alles negeren
Toevoegen aan woordenboek
Post bus
Post-bus
Posts
Postbags
Post's
Bewerken
Alles negeren
Toevoegen aan woordenboek
discriminate
disseminate
disseminated
disseminates
dissimulate
Bewerken
Terugzetten naar "discirminate"
Post bus
Post-bus
Posts
Postbags
Post's
Bewerken
Alles negeren
Toevoegen aan woordenboek
error
err
Errol
euro
Ebro
Bewerken
Terugzetten naar "erro"
anybody
any bode
any-bode
anybodies
abode
Bewerken
Terugzetten naar "anybode"
Easy IT
Easy-IT
East
Essayist
Astir
Bewerken
Terugzetten naar "EasyIT"
 
Back
Top