PC Review Forums Newsgroups Microsoft Outlook Microsoft Outlook VBA Programming Outlook 2k6 Script: Pb extracting list of contact.

Reply

Outlook 2k6 Script: Pb extracting list of contact.

 
Thread Tools Rate Thread
Old 20-12-2006, 09:42 AM   #1
news.microsoft.com
Guest
 
Posts: n/a
Default Outlook 2k6 Script: Pb extracting list of contact.


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




  Reply With Quote
Old 20-12-2006, 03:20 PM   #2
Ken Slovak - [MVP - Outlook]
Guest
 
Posts: n/a
Default Re: Outlook 2k6 Script: Pb extracting list of contact.

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

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003
Reminder Manager, Extended Reminders, Attachment Options
http://www.slovaktech.com/products.htm


"news.microsoft.com" <bbnimda@yahoo.fr> wrote in message
news:e63TcsBJHHA.3552@TK2MSFTNGP03.phx.gbl...
> 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
>
>
>
>


  Reply With Quote
Old 21-12-2006, 09:23 AM   #3
bbnimda
Guest
 
Posts: n/a
Default Re: Outlook 2k6 Script: Pb extracting list of contact.

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]" <kenslovak@mvps.org> a écrit dans le message
de news: %23C2mWsEJHHA.3936@TK2MSFTNGP02.phx.gbl...
> So where is the code hanging now? Are there any DL's in the folder? Those
> don't have a full name property.
>
> --
> Ken Slovak
> [MVP - Outlook]
> http://www.slovaktech.com
> Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003
> Reminder Manager, Extended Reminders, Attachment Options
> http://www.slovaktech.com/products.htm
>
>
> "news.microsoft.com" <bbnimda@yahoo.fr> wrote in message
> news:e63TcsBJHHA.3552@TK2MSFTNGP03.phx.gbl...
>> 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
>>
>>
>>
>>

>



  Reply With Quote
Old 21-12-2006, 09:48 AM   #4
bbnimda
Guest
 
Posts: n/a
Default Re: Outlook 2k6 Script: Pb of cache Form

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
  Reply With Quote
Old 21-12-2006, 02:52 PM   #5
Ken Slovak - [MVP - Outlook]
Guest
 
Posts: n/a
Default Re: Outlook 2k6 Script: Pb of cache Form

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.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003
Reminder Manager, Extended Reminders, Attachment Options
http://www.slovaktech.com/products.htm


"bbnimda" <wahhhran-vba@yahoo.fr> wrote in message
news:%23OX4$TOJHHA.1468@TK2MSFTNGP04.phx.gbl...
> 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" <wahhhran-vba@yahoo.fr> a écrit dans le message de news:
> u9u2xHOJHHA.4112@TK2MSFTNGP04.phx.gbl...
>> 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]" <kenslovak@mvps.org> a écrit dans le
>> message de news: %23C2mWsEJHHA.3936@TK2MSFTNGP02.phx.gbl...
>>> So where is the code hanging now? Are there any DL's in the folder?
>>> Those don't have a full name property.
>>>
>>> --
>>> Ken Slovak
>>> [MVP - Outlook]
>>> http://www.slovaktech.com
>>> Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003
>>> Reminder Manager, Extended Reminders, Attachment Options
>>> http://www.slovaktech.com/products.htm
>>>
>>>
>>> "news.microsoft.com" <bbnimda@yahoo.fr> wrote in message
>>> news:e63TcsBJHHA.3552@TK2MSFTNGP03.phx.gbl...
>>>> 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
>>>>
>>>>
>>>>
>>>>
>>>

>>
>>

>
>


  Reply With Quote
Old 21-12-2006, 03:24 PM   #6
bbnimda
Guest
 
Posts: n/a
Default Re: Outlook 2k6 Script: Pb of cache Form

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 - [MVP - Outlook]" <kenslovak@mvps.org> a écrit dans le message
de news: uPMf5%23QJHHA.2632@TK2MSFTNGP06.phx.gbl...
> 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.
>
> --
> Ken Slovak
> [MVP - Outlook]
> http://www.slovaktech.com
> Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003
> Reminder Manager, Extended Reminders, Attachment Options
> http://www.slovaktech.com/products.htm
>
>
> "bbnimda" <wahhhran-vba@yahoo.fr> wrote in message
> news:%23OX4$TOJHHA.1468@TK2MSFTNGP04.phx.gbl...
>> 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" <wahhhran-vba@yahoo.fr> a écrit dans le message de news:
>> u9u2xHOJHHA.4112@TK2MSFTNGP04.phx.gbl...
>>> 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]" <kenslovak@mvps.org> a écrit dans le
>>> message de news: %23C2mWsEJHHA.3936@TK2MSFTNGP02.phx.gbl...
>>>> So where is the code hanging now? Are there any DL's in the folder?
>>>> Those don't have a full name property.
>>>>
>>>> --
>>>> Ken Slovak
>>>> [MVP - Outlook]
>>>> http://www.slovaktech.com
>>>> Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003
>>>> Reminder Manager, Extended Reminders, Attachment Options
>>>> http://www.slovaktech.com/products.htm
>>>>
>>>>
>>>> "news.microsoft.com" <bbnimda@yahoo.fr> wrote in message
>>>> news:e63TcsBJHHA.3552@TK2MSFTNGP03.phx.gbl...
>>>>> 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
>>>>>
>>>>>
>>>>>
>>>>>
>>>>
>>>
>>>

>>
>>

>



  Reply With Quote
Old 21-12-2006, 03:47 PM   #7
Ken Slovak - [MVP - Outlook]
Guest
 
Posts: n/a
Default Re: Outlook 2k6 Script: Pb of cache Form

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.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003
Reminder Manager, Extended Reminders, Attachment Options
http://www.slovaktech.com/products.htm


"bbnimda" <wahhhran-vba@yahoo.fr> wrote in message
news:OxUVYRRJHHA.780@TK2MSFTNGP03.phx.gbl...
>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


  Reply With Quote
Old 21-12-2006, 04:09 PM   #8
bbnimda
Guest
 
Posts: n/a
Default Re: Outlook 2k6 Script: Pb of cache Form

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


"Ken Slovak - [MVP - Outlook]" <kenslovak@mvps.org> a écrit dans le message
de news: OyVxTdRJHHA.4068@TK2MSFTNGP03.phx.gbl...
> 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.
>
> --
> Ken Slovak
> [MVP - Outlook]
> http://www.slovaktech.com
> Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003
> Reminder Manager, Extended Reminders, Attachment Options
> http://www.slovaktech.com/products.htm
>
>
> "bbnimda" <wahhhran-vba@yahoo.fr> wrote in message
> news:OxUVYRRJHHA.780@TK2MSFTNGP03.phx.gbl...
>>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

>



  Reply With Quote
Old 21-12-2006, 04:29 PM   #9
bbnimda
Guest
 
Posts: n/a
Default Re: Outlook 2k6 Script: Pb of cache Form

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






"bbnimda" <wahhhran-vba@yahoo.fr> a écrit dans le message de news:
Op5FRpRJHHA.1248@TK2MSFTNGP02.phx.gbl...
>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
>
>
> "Ken Slovak - [MVP - Outlook]" <kenslovak@mvps.org> a écrit dans le
> message de news: OyVxTdRJHHA.4068@TK2MSFTNGP03.phx.gbl...
>> 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.
>>
>> --
>> Ken Slovak
>> [MVP - Outlook]
>> http://www.slovaktech.com
>> Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003
>> Reminder Manager, Extended Reminders, Attachment Options
>> http://www.slovaktech.com/products.htm
>>
>>
>> "bbnimda" <wahhhran-vba@yahoo.fr> wrote in message
>> news:OxUVYRRJHHA.780@TK2MSFTNGP03.phx.gbl...
>>>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

>>

>
>



  Reply With Quote
Old 21-12-2006, 05:48 PM   #10
Ken Slovak - [MVP - Outlook]
Guest
 
Posts: n/a
Default Re: Outlook 2k6 Script: Pb of cache Form

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.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003
Reminder Manager, Extended Reminders, Attachment Options
http://www.slovaktech.com/products.htm


"bbnimda" <wahhhran-vba@yahoo.fr> wrote in message
news:uKXiD0RJHHA.1064@TK2MSFTNGP04.phx.gbl...
>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


  Reply With Quote
Reply



Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off