View Single Post
  #3   Report Post  
Posted to microsoft.public.word.docmanagement
Stefan Blom[_3_] Stefan Blom[_3_] is offline
external usenet poster
 
Posts: 6,897
Default Easier Way to Mark Index Items Word 2010?

Sorry, I spotted an error. Use this macro instead:

Sub InsertMainIndexEntryFromSel()
If Selection.Range.Text = "" Then
MsgBox "Nothing is selected. Please try again."
Exit Sub
End If
ActiveDocument.Indexes.MarkEntry Range:=Selection.Range, Entry:= _
Selection.Range.Text, Bold:=False, Italic:=False
ActiveWindow.ActivePane.View.ShowAll = False
End Sub

--
Stefan Blom
Microsoft Word MVP




"Stefan Blom" wrote in message
...
If you want to quickly create a main index entry (no cross-references or
sub-entries) based on the current selection, just run the following macro:

Sub InsertMainIndexEntryFromSel()
If Selection.Range.Text = "" Then
MsgBox "Nothing is selected. Please try again."
Exit Sub
End If
ActiveDocument.Indexes.MarkEntry Range:=Selection.Range, Entry:= _
"Selection.Range.Text", Bold:=False, Italic:=False
ActiveWindow.ActivePane.View.ShowAll = False
End Sub

Save the macro in Normal.dotm and assign a button on the Quick Access
Toolbar to it. See http://www.gmayor.com/installing_macro.htm.

--
Stefan Blom
Microsoft Word MVP




"Leslie Coover" wrote in message
...
After text has been highlighed, the shortcut keys to mark an item in Word
2010 a

€’ Alt + Shift + X
€’ Press Enter
€’ Press ESC
€’ Ctrl + Shift + *

I tried to make a macro to combine these steps into one shorcut. When I
use my shortcut on the first entry it appears in my document when I show
paragraph marks (ΒΆ) and when I create an Index. However, on the next
entry it appears when ΒΆ is selected, but not when I update, or recreate
the Index.

Any suggestions welcomed. I would like to find an easier way to mark an
index item rather than going through all the steps listed above.

˜Ό˜»˜Ό