Indexing a document:Possible formatting problem

  • Thread starter Thread starter Dave Neve
  • Start date Start date
D

Dave Neve

Hi

Haven't been on this group for ages which means that I am getting on top of
Word until.......

I had to index my first ever document and it has taken me a long time.

The problem is (me thinks) that when I was preparing my index table to apply
to my doc, I changed the format of some words.

For instance, if in the .doc there was a Word with italics or Capital
letters, in the table I applied 'normal' or 'small capitals'.

The idea was to have an index which looked uniform.

When I asked Word to index, a number of words (hundreds) were omitted.

Have I guessed the problem and is there anything I can do besides starting
again (weep, weep)

Thanks in advance

Dave Neve
 
Hi Dave,

I didn't really understand what your problem is (... or is there more than one?).

If hundreds of words don't appear in the index, have you made sure they do have index fields? And do those XE fields belong to the same index (\f switch)?

If you loose the formatting you applied manually after you update the index: That might be pretty easy to reapply using "Find/Replace" (say, replacing "bold" with "not bold + small caps" ...).

One problem you might run into with entries in capital letters and small caps is that you have to be a little careful not to get different index entries for different capitalization.

Greetings,
Klaus
 
No, they don't have XE fields because he was using a concordance, and
concordances take a notoriously literal view of indexing.

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA

Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.

Hi Dave,

I didn't really understand what your problem is (... or is there more than
one?).

If hundreds of words don't appear in the index, have you made sure they do
have index fields? And do those XE fields belong to the same index (\f
switch)?

If you loose the formatting you applied manually after you update the index:
That might be pretty easy to reapply using "Find/Replace" (say, replacing
"bold" with "not bold + small caps" ...).

One problem you might run into with entries in capital letters and small
caps is that you have to be a little careful not to get different index
entries for different capitalization.

Greetings,
Klaus
 
No, they don't have XE fields because he was using a concordance,

Missed the part about the "index table".
and concordances take a notoriously literal view of indexing.

Beyond the capitalization problem I mentioned?

Regards,
Klaus
 
Singular vs. plural, I expect.

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA

Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.

Klaus Linke said:
No, they don't have XE fields because he was using a concordance,

Missed the part about the "index table".
and concordances take a notoriously literal view of indexing.

Beyond the capitalization problem I mentioned?

Regards,
Klaus
 
So - the answer is to go through the entire document sentence by sentence and
not each entry with an XE field? Any 'tricks' to speeding up that process?
 
Hi Helen,

A trick I use is to apply a character style "Index" to all prospective index entries, and then use a macro to add XE fields for them when the document is done (see macro below).
You might still want to check each entry once (Edit>Find "^d XE" and have a quick look), and modify the text that shall appear in the index if needed (singular versus plural, capitalization, sub-entries, ...).

Greetings,
Klaus

Sub IndexForCharStyle()
Dim myCharStyle As String
Dim myEntry As String
Dim myField As Field

myCharStyle = "Index"
Selection.HomeKey (wdStory)
With Selection.Find
.ClearFormatting
.Style = myCharStyle
.Text = ""
.Forward = True
.Wrap = wdFindStop
.Format = True
End With
While Selection.Find.Execute
myEntry = Selection.Text
Selection.Collapse (wdCollapseEnd)
Selection.Fields.Add _
Range:=Selection.Range, _
Type:=wdFieldIndexEntry, _
Text:=Chr(34) & Trim(myEntry) & Chr(34) ' & " \f ""m"""
Selection.Collapse (wdCollapseEnd)
Wend
Selection.EndKey Unit:=wdStory
Selection.TypeParagraph
' change the index field (language ...)
' below, or insert it by hand
Selection.Fields.Add _
Range:=Selection.Range, _
Type:=wdFieldIndex, _
Text:="\c ""1"" \z ""1031"" \f ""m"""
Selection.WholeStory
Selection.Fields.Update
Selection.Collapse (wdCollapseEnd)
ActiveWindow.View.ShowFieldCodes = False
' If you want to immediately remove the index fields:
' For Each myField In ActiveDocument.Fields
' If myField.Type = wdFieldIndexEntry Then
' If InStr(myField.Code.Text, "\f ""m""") > 0 Then
' myField.Delete
' End If
' End If
' Next myField
End Sub
 
I love the idea of using a style and macro but I am already using styles
(paragraph styles?) in my document (Heading 1, Heading 2, Heading 3, body
text, etc) - how do I also use an 'index' character style without goofing up
the existing styles? The existing styles are used primarily as the basis for
my TOC...
 
You define a character style named Index that has no formatting (that is, it
is defined as Default Paragraph Font +). So it doesn't change the formatting
of the paragraph style. An easy way to do this is to select the Default
Paragraph Font character style and click New..., select Character for the
style type, give it a name, and save.

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA

Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.

helen said:
I love the idea of using a style and macro but I am already using styles
(paragraph styles?) in my document (Heading 1, Heading 2, Heading 3, body
text, etc) - how do I also use an 'index' character style without goofing up
the existing styles? The existing styles are used primarily as the basis for
my TOC...
index entries, and then use a macro to add XE fields for them when the
document is done (see macro below).have a quick look), and modify the text that shall appear in the index if
needed (singular versus plural, capitalization, sub-entries, ...).
 
Back
Top