Combo Box listing Autotext Entries from Add-In Template 
Author Message
 Combo Box listing Autotext Entries from Add-In Template

Thanks to some help on this site, I have managed to create a combo-box on a
user form (Word 97) which displays autotext entries from the attached
template.  I need the autotexts to come from an attached template.  I have
sorted out the code to add the add-in, but haven't managed to address it
successfully to list the autotexts from the addin rather than the attached
template.  I would be so grateful if anyone can help.

Thanks in anticipation.

Morag



Sat, 24 Jul 2004 00:18:40 GMT  
 Combo Box listing Autotext Entries from Add-In Template
The suggestion I was given to replaced the code:
    ThisDocument.AttachedTemplate
with
    Templates("TemplateName.dot")
did not work!  Sorry.

The procedure simply stops running, with no error message or indication of
what the problem is.

Help!

Thanks again for your time, folks

Regards

Morag


Quote:
> Thanks to some help on this site, I have managed to create a combo-box on
a
> user form (Word 97) which displays autotext entries from the attached
> template.  I need the autotexts to come from an attached template.  I have
> sorted out the code to add the add-in, but haven't managed to address it
> successfully to list the autotexts from the addin rather than the attached
> template.  I would be so grateful if anyone can help.

> Thanks in anticipation.

> Morag



Sat, 24 Jul 2004 02:04:52 GMT  
 Combo Box listing Autotext Entries from Add-In Template
Hi Morag,

Did you use the file and pathname on the Templates object:
    Templates("Path And TemplateName.dot")

Otherwise, try

-------------------------------------
Dim oAutoTextEntry As AutoTextEntry
Dim oTemplate As Template

  For Each oTemplate In Templates
    If oTemplate.Name = ThisDocument.Name Then
      For Each oAutoTextEntry In oTemplate.AutoTextEntries
        MsgBox oAutoTextEntry.Name
      Next
    End If
  Next

  Set oAutoTextEntry = Nothing
  Set oTemplate = Nothing
-------------------------------------

Hope this helps,
regards,
Astrid

So that all can benefit from the discussion, please post all follow-ups to the newsgroup.
Visit the MVP Word FAQ site at http://www.mvps.org/word/


Quote:
> The suggestion I was given to replaced the code:
>     ThisDocument.AttachedTemplate
> with
>     Templates("TemplateName.dot")
> did not work!  Sorry.

> The procedure simply stops running, with no error message or indication of
> what the problem is.

> Help!

> Thanks again for your time, folks

> Regards

> Morag



> > Thanks to some help on this site, I have managed to create a combo-box on
> a
> > user form (Word 97) which displays autotext entries from the attached
> > template.  I need the autotexts to come from an attached template.  I have
> > sorted out the code to add the add-in, but haven't managed to address it
> > successfully to list the autotexts from the addin rather than the attached
> > template.  I would be so grateful if anyone can help.

> > Thanks in anticipation.

> > Morag



Sat, 24 Jul 2004 07:16:36 GMT  
 Combo Box listing Autotext Entries from Add-In Template
In Word 97 and 2000 I've successfully used the following
to display the names of the AutoText entries in the
template or add-in that's running the user form:

Dim atEntry As AutoTextEntry
For Each atEntry In Templates
(ThisDocument.FullName).AutoTextEntries
    ComboBox1.AddItem atEntry.Name
Next atEntry

Hope this helps,
Lynn

Quote:
>-----Original Message-----
>The suggestion I was given to replaced the code:
>    ThisDocument.AttachedTemplate
>with
>    Templates("TemplateName.dot")
>did not work!  Sorry.

>The procedure simply stops running, with no error message
or indication of
>what the problem is.

>Help!

>Thanks again for your time, folks

>Regards

>Morag


in message

>> Thanks to some help on this site, I have managed to

create a combo-box on
Quote:
>a
>> user form (Word 97) which displays autotext entries
from the attached
>> template.  I need the autotexts to come from an

attached template.  I have
Quote:
>> sorted out the code to add the add-in, but haven't

managed to address it
Quote:
>> successfully to list the autotexts from the addin

rather than the attached

- Show quoted text -

Quote:
>> template.  I would be so grateful if anyone can help.

>> Thanks in anticipation.

>> Morag

>.



Sun, 25 Jul 2004 08:21:43 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. Listing Autotext Entries in UserForm Combo Box

2. Combo Box That Adds Typed Entry to List

3. Adding the alphabet in a list box or combo list

4. adding to a combo box or list box

5. Combo Box - Going to a specific entry in the list

6. Highlighting entries in list portion of combo box

7. Changing fonts on one entry in a list/combo box

8. Macro that inserts Autotext loses styles of Autotext entry

9. How add entries in an ActiveX combo box ?

10. Adding entry to a Combo Box in code

11. Combobox listing a selection of autotext entries

12. Adding autotext entries without selecting text?

 

 
Powered by phpBB® Forum Software