Template Names availble to VBA

S

Stu

I'm writing some VBA code in MS Access that integrates an application with
MS Word. I would like to create a form in Access that asks the user to
identify the template that they have created in Word for specific purposes.
In this Access form, I would like to have a combo or list box that lists the
available Word templates on the user's machine so that the user can select a
template name from the list. The contents from the combo or list box should
be generated dynamically from the templates found on the user's machine.

Is there an object in Word that will enumerate the templates that have been
stored on the user's machine? Or am I going to have to get that from
Windows somehow? And if I get it from Windows, where do I look? It's my
impression that templates might be stored in a bunch of different places on
a user's machine.

Stu
 
D

Doug Robbins - Word MVP - DELETE UPPERCASE CHARACT

Hi Stu,

I am a bit surprised that you would be doing automation/integration such as
this without there being a set of pre-defined templates rather than a
variable list of templates. However, see the article "How to read the
filenames of all the files in a directory into an
array” at:

http://www.mvps.org/word/FAQs/MacrosVBA/ReadFilesIntoArray.htm

Please post any further questions or followup to the newsgroups for the
benefit of others who may be interested. Unsolicited questions forwarded
directly to me will only be answered on a paid consulting basis.
Hope this helps
Doug Robbins - Word MVP
 

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