Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.docmanagement
A in Wyoming A in Wyoming is offline
external usenet poster
 
Posts: 2
Default Creating Multiple Indices

I have a very large Word 2003 document - 350 + pages - in which I need to
create 2 indices, one subject and one surname. I cannot, for the life of me,
figure out how to create 2 indices in the same document.

Any help and/or guidance is GREATLY appreciated!

Thank you in advance!
  #2   Report Post  
Posted to microsoft.public.word.docmanagement
Klaus Linke Klaus Linke is offline
external usenet poster
 
Posts: 413
Default Creating Multiple Indices

You need the field switch \f with some letter for each type of index, both
in the XE index entry fields, and in the INDEX field that creates the index.
Say (since "s" might be confusing in your example) \f "t" for topics and \f
"n" for names:
{ XE "Some name" \f "n" } or { XE "Some topic" \f "t" }, and then
{ INDEX \f "n" } or { INDEX \f "t" } for an index just with those entries.
As far as I know, only one letter is allowed (or used)... There is something
in the help on it.

I usually add the XE fields with macros, or by hand, anyway... but I don't
think there's a way to add the switch from the dialog.
Even the usual VBA method, Indexes.MarkEntry, does not know about that
switch.

But you can use character styles for the names, and the topics (which has
the added advantage that you can format them any way you like at any time,
or highlight them temporarily), and then use a macro to add the XE fields...
The one below is for a character style called "name style", and adds XE
fields with an \f "n" switch -- Of course, you could adapt it to another
style name or switch.

Regards,
Klaus

Sub CharStyleToIndex2()
' marks up all text formatted in some char style
' as index entries
Dim myCharStyle As String
' Insert the name of your char style he
myCharStyle = "name style"
Dim strEntry As String
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
Selection.Collapse (wdCollapseEnd)
ActiveDocument.Fields.Add _
Range:=Selection.Range, _
Type:=wdFieldIndexEntry, _
Text:="""" & strEntry & """ \f ""n""", _
PreserveFormatting:=False

Selection.Collapse (wdCollapseEnd)
Wend
End Sub


Regards,
Klaus




"A in Wyoming" wrote:
I have a very large Word 2003 document - 350 + pages - in which I need to
create 2 indices, one subject and one surname. I cannot, for the life of
me,
figure out how to create 2 indices in the same document.

Any help and/or guidance is GREATLY appreciated!

Thank you in advance!



  #3   Report Post  
Posted to microsoft.public.word.docmanagement
Klaus Linke Klaus Linke is offline
external usenet poster
 
Posts: 413
Default Creating Multiple Indices

BTW, so you don't end up with an inflation of XE fields in your document:
You can delete them all with one replacement: Show hidden text, so the XE
fields are visible, and replace ^d XE with nothing.
(^d is the placeholder for a field brace, and if you match part of a field,
the whole field will be found)

Regards,
Klaus


  #4   Report Post  
Posted to microsoft.public.word.docmanagement
A in Wyoming A in Wyoming is offline
external usenet poster
 
Posts: 2
Default Creating Multiple Indices

Thank you very much! This information is of tremendous help!



"Klaus Linke" wrote:

BTW, so you don't end up with an inflation of XE fields in your document:
You can delete them all with one replacement: Show hidden text, so the XE
fields are visible, and replace ^d XE with nothing.
(^d is the placeholder for a field brace, and if you match part of a field,
the whole field will be found)

Regards,
Klaus



Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
creating a multiple page form jetsetlady Microsoft Word Help 1 December 6th 06 08:53 PM
Creating a TOC from multiple cells of a table. Scott Tables 2 October 26th 06 08:43 AM
Creating multiple TOC HRobinson Page Layout 7 October 18th 06 02:12 AM
Multiple Envelopes -- Creating CS Gosdin Microsoft Word Help 1 March 25th 05 08:32 PM
Creating one document out of multiple documents kamy107 Microsoft Word Help 1 January 14th 05 03:06 PM


All times are GMT +1. The time now is 08:25 PM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"