Lists of Specific Words - Wordperfect Feature Conversion

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

How can I create a list of specific words used in a document without creating
a separate marking for them, such as the index uses. Is there anyway to use
a style that could create a list (using a character style that feeds into a
TOC entry). It will only be words, not complete sentences.

The issue with a "marked text - duplicate selection of text being created"
is ensuring that edits are made in the "marked text area" as well.
Wordperfect had a listing feature that marked the actual selected text and it
did not create a duplicate area. Thanks in advance for any ideas or
suggestions.
 
I think you'd better explain a little further what you are talking about.
What is the end result that you want to have? And what version of Word are
you using?

In response to your first paragraph, I say, "type a list". Your second
paragraph makes no sense to me whatsover.
 
Hi,

You can create an index out of all words (phrases) marked in some character style "myIndex" with the macro below.
It's still easiest to use the built-in index feature (= insert XE fields), but you can immediately unlink the index (turn the index field into plain text), and delete the XE fields in the same macro.

Regards,
Klaus


Sub CharStyleToIndex()
' marks up all text formatted in some char style
' as index entries
Dim myCharStyle As String
' Insert the name of your char style here:
myCharStyle = "myIndex"
Dim strEntry As String
Dim strOut As String
Dim start
Application.ScreenUpdating = False
ActiveWindow.View.ShowAll = False
ActiveWindow.View.ShowHiddenText = False
Selection.HomeKey (wdStory)
With Selection.Find
.ClearFormatting
.Style = myCharStyle
.Text = ""
.Forward = True
.Wrap = wdFindStop
.Format = True
End With
While Selection.Find.Execute
strEntry = Selection.Text
ActiveDocument.Indexes.MarkEntry _
Range:=Selection.Range, Entry:=strEntry
Selection.Collapse (wdCollapseEnd)
Wend
With ActiveDocument
.Range(.Range.End - 1, .Range.End).Select
Selection.InsertParagraphAfter
Selection.Move Unit:=wdCharacter, Count:=1
.Indexes.Add Range:=Selection.Range, _
HeadingSeparator:=wdHeadingSeparatorNone, _
Type:=wdIndexIndent, _
RightAlignPageNumbers:=False, _
NumberOfColumns:=2
.Indexes(1).TabLeader = wdTabLeaderDots
End With
Selection.MoveStart Unit:=wdCharacter, Count:=-1
Selection.Fields(1).Unlink
With ActiveWindow
.View.ShowFieldCodes = True
.ActivePane.View.ShowAll = True
End With
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.Text = "^d XE"
.Replacement.Text = ""
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
End Sub
 
I am using Word 2003. The end result that I need is a list of words for an
index that includes page numbers. The difficulty with the "index process"
currently in word is that it creates a duplicate of the marked word. When
edits are made there is a chance that the person won't think to make those
edits to the duplicated words (if they don't think to ensure that the hidden
text is on) which would be time consuming to check and there is not usually
time at that point in the process to recheck. So if there is a way to mark
the "actual text" and have that drop into a list that will alleviate the
chance for edits to be missed.

Thanks.
 
So you have created an index where one of the words, for instance, is
"cyber-café". When someone comes along and changes it to "cybercafe", you
want the index field to also change to "cybercafe", and "cybercafe" to be
listed in the index instead of "cyber-café".

Is that what you mean?

The macro Klaus Linke offered should make that easier (since you bothered to
reply to my message, I'm guessing you didn't understand how to use it?). If
I have understood it correctly, the macro finds all words formatted in the
MyIndex style and creates an index field for them, then inserts the Index,
turns it to plain text, and deletes the index fields (XE fields).

You will have to re-run the macro after each round of editing, to generate
an updated accurate index, but once the words are formatted in the MyIndex
style, they should hold that formatting, and the macro will re-mark them
with index entries for you. If people start adding new text, some words may
get missed, however.

You will have to go through and apply the character style MyIndex at least
once, find and replace will probably help there. You will also have to
create the MyIndex style, which you can call anything you want so long as
you set the macro to match.

If you don't know what to do with the macro, see here
Guide to Installing Macros
http://www.gmayor.com/installing_macro.htm

And experiment on a COPY of the document.

Alternatively, don't create the index until editing is all finished.

DM
 

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

Back
Top