Problem obtaining list of available templates

A

Andy Rigby

Hi

I'm driving Word 2000 from VB via office automation, and trying to get
a list of the templates that Word has available.

The code is something like this:

'----------------------------------------------------
Dim mywobj As Object
Set mywobj = New Word.Application

On Error Resume Next
For I = 1 To mywobj.Templates.Count
print mywobj.Templates(I).name
next
'----------------------------------------------------

The problem is that only one template ever appears in the collection -
Normal.dot. The mywobj.Templates.Count is always 1.

However, I have several other templates that I have created from
within Word.

How can I get a list of all available templates?

Thanks in advance

Andy
 

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