Group: microsoft.public.word.vba.general
From: Helmut Weber
Date: Wednesday, April 02, 2008 10:06 AM
Subject: Re: loop validation

Hi Jake,

instead of trying to insert,
trapping a possible error and deleting afterwards,
you might check, whether such an autotextentry exists,

like that:

Sub Test6009()
Dim MyText As String
MyText = "MyAutoText"
Dim MyAuto As AutoTextEntry
For Each MyAuto In NormalTemplate.AutoTextEntries
If MyAuto.Name = "MyAutoText" Then
MsgBox "found"
End If
Next
End Sub

--

Greetings from Bavaria, Germany

Helmut Weber, MVP WordVBA

Vista Small Business, Office XP