Search Public folders

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

i have found some code on the internet to search public folders. When i use
it on a folder in my personal folder tree everything works fine and fast, but
when i pick a folder from a public folder tree ( if it is more then 200 in
the search result) i get a runtime error. It seems like i loose connection
with the public folder and as if i get pushed out. When i use the built in
advance search with a public folder it works fine so i know i have good
connection and i never get a diconnected outlook message. I know it is not
alot to go by, but if anyone knows a good why to build code to search public
folders, please let me know.

thanks

Irene
 
You really need to tell more about your setup and show your code.

What version of Outlook? Exchange cached mode in Outlook 2003?

Where does this code live?

What coding language?
 
sorry,

Using a customized outlook message form with vb script. Outlook 2003 with
exchange cashed mode.I have put some txtboxes and a listbox on the form

some of the code:

If tInput <> "" Then
If gInput <> "" Then
If sInput <> "" Then
Set SearchItem =
MyItems.Find("([Type]="""&tInput&"""and[Group]="""&gInput&"""and[Subgroup]="""&sInput&""")")
While TypeName(SearchItem) <> "Nothing"
Mypage.Clist.AddItem(SearchItem.FullName)
count = count +1
Set SearchItem = MyItems.FindNext
Wend
else
Set SearchItem =
MyItems.Find("([Type]="""&tInput&"""and[Group]="""&gInput&""")")

While TypeName(SearchItem) <> "Nothing"
Mypage.Clist.AddItem(SearchItem.FullName)
count = count +1
Set SearchItem = MyItems.FindNext
Wend

End if

else


let me know if you need more info

thanks

Irene
 
Rather than using Find/FindNext I'd try using a restriction on the Items
collection of the folder and then iterating the returned filtered Items
collection. I'd also explicitly assign variables or objects to each dot
operator and release things explicitly (Set objWhatever = Nothing) and see
if those things help.

You could be running into the problem where Outlook internally creates a new
object for every dot operator you use and then doesn't release them until
the procedure ends, which can cause problems with running out of memory or
resources. Another possible problem might be RPC channels limits, roughly
240 or so with various overheads, that limit can only be changed on the
Exchange server in the registry.
 
Back
Top