Outlook 2k6 Script: Pb extracting list of contact.

N

news.microsoft.com

Hi all,

In a personal form, I use 2 combo

The first one allow to select the company the second one the name

when the company name changes, I extract a list of names from contact that
have the same
company name (using this function)
===============
Function ListUser()
target = item.companies
Set RepC = Application.GetNamespace("MAPI").Folders("public
folder").Folders("All public folder").Folders("My contact
adress").Folders("Contact B").Folders(target)
totalContct=RepC.items.count
Set FormPage = Item.GetInspector.ModifiedFormPages("Task1")
Set Control = FormPage.Controls("Uuser")
Control.clear
MyIndex=0
NbrI=0
switch=0
do while monindex < totalContct
MyIndex=MyIndex+1
Set myItem = Repc.Items(MyIndex)
Control.addItem myItem.fullname
loop
end Function
===========================
It was working rigth for a month, but now outlook hang's from time to time
when
we select a company in the 1st combo


Tks for help
 
K

Ken Slovak - [MVP - Outlook]

So where is the code hanging now? Are there any DL's in the folder? Those
don't have a full name property.
 
B

bbnimda

Hi ken

No All my contact have Fullname, but I think that the function isn't the Pb,
I Checked my Contact folder and the Pb is there, it hang when I try to open
some contact....

Any idea ?

tks
 
B

bbnimda

Hi Again,

I found more about my Pb I think that my structure of folder isn't
supported , but I must keep it

I organise my contact by sector like this, and publish my form in each sub
folder <<Sector>>
==============================
All publics folders
My Main Contact Filder
|______ Sector 1
|______ Sector 2
|______ Sector 3
 
K

Ken Slovak - [MVP - Outlook]

No custom form should ever be published in more than one folder. If you
publish the same form to multiple folders you're just asking for problems.

What I'd do is publish the form in the Organizational Forms Library so it's
available everywhere in your organization. I'd then set the default form for
the folders I was interested in to that default form.
 
B

bbnimda

I tryed to publish the form in the Organizational Forms Library, but it
return's me an error

I translate the error "An error accur when going to this folder" ???


I tryed many things on my SBS 2003 Server without success

I desactivate my Antivirus / Policy => no change

Did you have an idea ?

Tks


Ken Slovak - said:
No custom form should ever be published in more than one folder. If you
publish the same form to multiple folders you're just asking for problems.

What I'd do is publish the form in the Organizational Forms Library so
it's available everywhere in your organization. I'd then set the default
form for the folders I was interested in to that default form.




bbnimda said:
Hi Again,

I found more about my Pb I think that my structure of folder isn't
supported , but I must keep it

I organise my contact by sector like this, and publish my form in each
sub folder <<Sector>>
==============================
All publics folders
My Main Contact Filder
|______ Sector 1
|______ Sector 2
|______ Sector 3
.
.
|______ Sector 28
|______ Sector 29
|______ Sector 30
=============================

All this sub folder use the same Form, but each time I open a contact in
a different sector it create in form cache folder a new folder named
<< IPM.Contact.MyForm1>>
<< IPM.Contact.MyForm10>>
<< IPM.Contact.MyForm100>>
<< IPM.Contact.MyForm1000>>
<< IPM.Contact.MyForm10000>>

for maximum 5 folder , when I try to open a contact in the 6th sector it
hang, until I erase one of the << IPM.Contact.MyForm1xxx>> and there my
contact load the form and open it self

Tks for help


bbnimda said:
Hi ken

No All my contact have Fullname, but I think that the function isn't the
Pb, I Checked my Contact folder and the Pb is there, it hang when I try
to open some contact....

Any idea ?

tks


"Ken Slovak - [MVP - Outlook]" <[email protected]> a écrit dans le
message de %[email protected]...
So where is the code hanging now? Are there any DL's in the folder?
Those don't have a full name property.




Hi all,

In a personal form, I use 2 combo

The first one allow to select the company the second one the name

when the company name changes, I extract a list of names from contact
that have the same
company name (using this function)
===============
Function ListUser()
target = item.companies
Set RepC = Application.GetNamespace("MAPI").Folders("public
folder").Folders("All public folder").Folders("My contact
adress").Folders("Contact B").Folders(target)
totalContct=RepC.items.count
Set FormPage = Item.GetInspector.ModifiedFormPages("Task1")
Set Control = FormPage.Controls("Uuser")
Control.clear
MyIndex=0
NbrI=0
switch=0
do while monindex < totalContct
MyIndex=MyIndex+1
Set myItem = Repc.Items(MyIndex)
Control.addItem myItem.fullname
loop
end Function
===========================
It was working rigth for a month, but now outlook hang's from time to
time when
we select a company in the 1st combo


Tks for help
 
K

Ken Slovak - [MVP - Outlook]

Was an Organizational Forms Library set up at all on the server? Do you have
owner rights on that library? Any settings for that library are set using
the Exchange System Manager on the server. It's not something related to
SBS, I use SBS 2003 here and have that library and have given myself
permissions as owner on it.

You might need to post in an Exchange admin group to get exact details on
the library and permissions if you don't find that information in the
Exchange help.
 
B

bbnimda

I used default configuration of SBS 2003, and never some thing like this

Organizational Forms Library set up at all on the server

Where do I have to set this part ?

tks
 
B

bbnimda

I found it but can't set up , even when using Admi account directly on the
server

I have an error when I try to save the setting ? Antivirus PB ? or other
thing ??

Tks for your help
 
K

Ken Slovak - [MVP - Outlook]

Can't set what up? Is there an existing Organizational Forms Library? What
error when you try to save what setting?

Antivirus software would almost never have anything to do with your problem.
If you can't save to the library or it doesn't exist then as I said it's an
Exchange problem and you'd be best off posting in an Exchange forum.
 

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