Outlook View Control "Hangs"

A

Anita Gupta

Hello,

I've got a custom contact form with the Outlook View Control on it that
filters the list of contacts in the same folder to show other contacts at
the same company. There are about 30,000 contacts in the folder and when
opening a contact for the first time, Outlook hangs for several minutes
before displaying the contact. Once opened, it can be opened again very
rapidly and all information displays correctly. Is there anyway to speed
this up? I'm assuming that Exchange is cacheing the list of company names,
but should it be doing this for every contact or just the first time a
contact is opened? Here is my code:

Sub Item_Open()

If Not Item.CompanyName = "" Then

Set myView = Item.GetInspector.ModifiedFormPages("Company
Contacts").Controls("myVC")

myView.Folder = "\\Public Folders\All Public Folders\Candidates"

myView.Restriction = "[CompanyName] = """ & Item.CompanyName & """"

myView.View = "View Control"

End If

End Sub
 
S

Sue Mosher [MVP]

It's going to set a new filter for each item that uses a different company name. 30,000 contacts is a lot to have in one folder; I hope you have multiple processors on that box and a lot of RAM. Also note that you may run into problems because of restriction caching. I'm not sure whether it applies when the OVC is used, but I suspect it does. See http://www.slipstick.com/exs/pfshare.htm#problems, under folder's slowing down.
--
Sue Mosher, Outlook MVP
Outlook and Exchange solutions at http://www.slipstick.com
Author of
Microsoft Outlook Programming: Jumpstart
for Administrators, Power Users, and Developers
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top