[CE-L] QUERY: Can WordPerfect or Word automatically create a list - YES!

Subject: [CE-L] QUERY: Can WordPerfect or Word automatically create a list - YES!
From: Peter Collins <peter -dot- collins -at- BIGFOOT -dot- COM>
Date: Tue, 17 Nov 1998 22:23:04 +1100

Dear Jane.
Here is your solution. It works fine for me. Every Capitalised word in
the document will be placed in an index at the end of the document. I
regret that it will also catch the start of sentences. I could not rule
out: "Jones was the largest man the Szebowski had ever seen.", so you will
also get "When he was twelve, Jones ran away from home." Tough. No logical
way of avoiding that.
Place your document in Word6. That is a requirement. Switch back to
this email with Alt-Tab. Select the text here between the carats and Ctrl-C
to copy it to the clipboard <Create an index of all capitalised words in
the document> Switch back to Word with Alt-Tab.
Select Tools/Revisions/ turn off Mark Revisions, and click Accept All
if it is not greyed out.
Select Tools/ Macro/ Click Record, type NameIndex, Click in the
Description field, Ctrl-V to paste in the description. Click OK. A small
toolbar with two icons (with blue symbols - one circle the other a square)
is displayed (and the cursor becomes a tape cassette). Do not touch the
keyboard. Click the blue square ('Stop') icon.
Select Tools/Macro/NameIndex (on the list) and click Edit.
Switch back to this email with Alt-Tab. Highlight the code text that I
have given between the dotted lines below. Ctrl-C. Switch back to Word with
Click in the macro text. Ctrl-a to select it all (only Sub Main and End
Sub lines). Ctrl-V to paste in the code. Ctrl-S to save the code. Ctrl-F4
to close the macro.
Now for the fun. Tools/Macro/NameIndex, and this time click Run.
When the macro stops (typically it might do between 2 and 10 names per
second - visible on-screen) you will have an index of all the capitalised
words, and which pages to find them on.
In my tests it covered capitilised words at the very start and end of
the document - a harsh test for Word macros, I am told.
Any problems, contact me off list (why should I want my failures
Sub main
rem Macro to make concordance of proper names
rem Copyright (C) 1998
rem Peter L Collins
rem VIVID Management Pty Ltd
rem 26 Bradleys Head Road Mosman 2088
rem NSW Australia
rem +61 2 9968 3308
rem email peter -dot- collins -at- bigfoot -dot- com
rem conditions of use: the code shall not be changed:
rem and these comments be kept with it at all times:
rem subject thereto it may be freely distributed.
EditFind .Find = "<[A-Z]", \
.Direction = 0, .MatchCase = 0, \
.WholeWord = 0, .PatternMatch = 1, \
.SoundsLike = 0, .Format = 0, .Wrap = 0
While EditFindFound()
If AtEndOfDocument() Then Goto Index
WordRight 1, 1
Name$ = Selection$()
MarkIndexEntry .Entry = Name$, \
.Range = "", .Bold = 0, .Italic = 0, \
.CrossReference = "", \
.CrossReferenceAutoText = ""
InsertIndex .Type = 0, \
.HeadingSeparator = 2, \
.RightAlignPageNumbers = 0, \
.Columns = 2, .Replace = 0
End Sub
Peter Collins, VIVID Management Pty Ltd,
26 Bradleys Head Road, MOSMAN 2088, Australia
+61 2 9968 3308, fax +61 2 9968 3026, mobile +61 (0)18 419 571
Management Consultants and Technical Writers
email: peter -dot- collins -at- bigfoot -dot- com ICQ#: 10981283
web pages: http://www.angelfire.com/pe/pcollins/

From ??? -at- ??? Sun Jan 00 00:00:00 0000=

Previous by Author: Re: I really need some help or advice. on Word styles
Next by Author: Appears or Displays
Previous by Thread: Réf. : Regular expressions in Word/WordPerfect?
Next by Thread: JOB: Tulsa, OK

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

Sponsored Ads