Don't do that.
The Outlook object model is not suitable or supported for working in
anything but the main thread, not from any background threads. If you
attempt to spawn a thread to do what you want and it accesses the Outlook
object model in any way you will crash or hang Outlook.
You've heard of best practices? That's a worst practice.
--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007.
Reminder Manager, Extended Reminders, Attachment Options.
http://www.slovaktech.com/products.htm
"paresh" <paresh.DeleteThis@discussions.microsoft.com> wrote in message
news:0AF324DA-0B35-4A3E-BB2B-6F38C72390EA@microsoft.com...
> Hi,
>
> I have written an Outlook VBA add-in that retrieves a free/busy
> information
> for users/conference rooms and I expect it to take 10-15 seconds each
> time. I
> am planning to create individual thread for each process so that it could
> be
> done faster. Could you help me to write something like below code in VBA.
>
> For i=1 to nusers
> Create Thread for getting free/busy status for ith user;
> Next
> Wait for each threads to be terminated.
>
> Also let me know what are the extra care I need to take care while using
> thread in VBA code.
>
> Thanks.