Holding Outlook info in Arrays

D

David Bassett

I have a package of macros and templates for a client
that is a law firm. They want to interact with Microsoft
Outlook for several templates. It may be how I have my
code written but it seems very slow to retrieve the
Contact info. This could be partially because they have
some users with nearly 2000 contacts. Additionally, I
was connecting to Outlook with the individual templates.

To attempt to improve the performance, speed-wise and
efficiency, I thought I would try to connect just once to
Outlook when Word was launched and hold the Contact info
in arrays. I have a custom template that hold's custom
toolbars and menus that is in the startup folder so I
thought that I could add the code for the Outlook
connection in it. To be sure that it would execute each
time Word was launched I made a call to the module I have
the code to access Outlook in the the AutoExec macro.

It worked the first time I used it but when I rebooted my
machine to do further performance testing the template
could no longer locate the arrays and suddenly there was
a reference to Normal.dot in the template, that was not
there before.

Is there a way that I can create these arrays when Word
launches and still be able to access them?

TIA!

david
 
W

Word Heretic

G'day "David Bassett" <[email protected]>,

in some module of global project have Public TheArray() as String

and in the autoexec redim and populate it.


David Bassett said:
I have a package of macros and templates for a client
that is a law firm. They want to interact with Microsoft
Outlook for several templates. It may be how I have my
code written but it seems very slow to retrieve the
Contact info. This could be partially because they have
some users with nearly 2000 contacts. Additionally, I
was connecting to Outlook with the individual templates.

To attempt to improve the performance, speed-wise and
efficiency, I thought I would try to connect just once to
Outlook when Word was launched and hold the Contact info
in arrays. I have a custom template that hold's custom
toolbars and menus that is in the startup folder so I
thought that I could add the code for the Outlook
connection in it. To be sure that it would execute each
time Word was launched I made a call to the module I have
the code to access Outlook in the the AutoExec macro.

It worked the first time I used it but when I rebooted my
machine to do further performance testing the template
could no longer locate the arrays and suddenly there was
a reference to Normal.dot in the template, that was not
there before.

Is there a way that I can create these arrays when Word
launches and still be able to access them?

TIA!

david

Steve Hudson

Word Heretic, Sydney, Australia
Tricky stuff with Word or words for you.
wordheretic.com

Replies offlist may require payment.
 

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