Easier Way to Mark Index Items Word 2010?


L

Leslie Coover

After text has been highlighed, the shortcut keys to mark an item in Word 2010 are:

• 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.

☼☻☼
 
Ad

Advertisements

S

Stefan Blom

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.
 
S

Stefan Blom

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
 
L

Leslie Coover

Thank you so much Stefan, the code works perfectly and the Idiots' guide to installing macros was very helpful.

Leslie Charles
 
Ad

Advertisements

Ad

Advertisements


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

Similar Threads

Marking Whole Words for Index 2
Mark An Index 3
Index marking a ( 4
Easier way to traverse text 1
Marking Subentry for index 5
Marking text for indexing 2
Word 2010 1
Mark Index Entry>Mark All 2

Top