Run time error '-2147352567 (80020009)'

  • Thread starter Thread starter Carol Geddes
  • Start date Start date
C

Carol Geddes

I get the runtime error and it says "Array index out of bounds"
On the second line of code below.

Set nms = Outlook.GetNamespace("Mapi")
Set fld = nms.Folders(olFolderContacts).Folders("ModifiedContact")

Originally I had in the second line.
Set fld = nms.GetDefaultFolder(olFolderContacts)
This worked but I wish to go to a custom folder now.

Any idea what am I doing wrong?
I find the help quite difficult to use in Outlook 2000.

Thanks, (newbie)
Carol
 
Pass the name of the folder instead of olFolderContacts. Note that in case
of a child folder, you'd need to use this repeatedly to drill down the
hierarchy:

fld = nms.Folders("Parent Folder").Folders("ModifiedContact")


Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
 
Thank you
Dmitry Streblechenko (MVP) said:
Pass the name of the folder instead of olFolderContacts. Note that in case
of a child folder, you'd need to use this repeatedly to drill down the
hierarchy:

fld = nms.Folders("Parent Folder").Folders("ModifiedContact")


Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
 
Back
Top