Sub ShowUsedListTemplates

Subject: Sub ShowUsedListTemplates
From: "Steve Hudson" <steve -at- wright -dot- com -dot- au>
To: "TECHWR-L" <techwr-l -at- lists -dot- raycomm -dot- com>
Date: Wed, 21 Nov 2001 12:09:31 +1100

This lil routine will insert the name of the attached list template at the
start of every list paragraph in square brackets to enable simple
identification of scrambled lists.

The first loop names any unnamed listtemplates for identification purposes.
The second loop does the inserting of the name, which is the only real id
that a listtemplate carries. Unless its explictly added via VBA,
listtemplates have no name. Unbelievable.

Sub ShowUsedListTemplates()
Dim k As Long
On Error Resume Next
With ActiveDocument

For k = 1 To ActiveDocument.ListTemplates.Count
With .ListTemplates(k)
If .Name = "" Then .Name = Format(k)
End With
Next

For k = 1 To .ListParagraphs.Count
With .ListParagraphs(k)
.Range.InsertBefore "[" &
.Range.ListFormat.ListTemplate.Name & "]"
End With
Next
End With
End Sub

Steve Hudson , HDK List MVP
Wright Technologies Pty Ltd (Aus)





^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Collect Royalties, Not Rejection Letters! Tell us your rejection story when you
submit your manuscript to iUniverse Nov. 6 -Dec. 15 and get five free copies of
your book. What are you waiting for? http://www.iuniverse.com/media/techwr

Have you looked at the new content on TECHWR-L lately?
See http://www.raycomm.com/techwhirl/ and check it out.

---
You are currently subscribed to techwr-l as: archive -at- raycomm -dot- com
To unsubscribe send a blank email to leave-techwr-l-obscured -at- lists -dot- raycomm -dot- com
Send administrative questions to ejray -at- raycomm -dot- com -dot- Visit
http://www.raycomm.com/techwhirl/ for more resources and info.


Previous by Author: RE: STYLE: Is Firmware always Firmware?
Next by Author: Auto-rebuilding word templates
Previous by Thread: Does anyone know of a way to insert a Page Break in a HTML docume nt?
Next by Thread: Grad Student Seeking Participants


What this post helpful? Share it with friends and colleagues:


Sponsored Ads