Macro to fix control click for a sentence

  • Thread starter removing all headers and footers
  • Start date
R

removing all headers and footers

Is there a way to create a macro using a simple keyboard shortcut that will
only select one sentence quickly like control click does normally?
Control+click has a serious flaw for use in a manuscript with a lot of
endnotes at the end of sentences. It always selects not only the sentence
clicked on, but also the previous endnote on the previous sentence. Is there
a way to make it only selected the sentence at hand and not the previous
endnote, with a keyboard macro. I use this control+click a lot on large mss
with lots of endnotes.

Note: control+click will not select, oddly eneough, spaces before a sentence
or a bracket after a previous sentence's period, just an endnote number after
the last sentence's period??
 
D

Doug Robbins - Word MVP

The following code in a macro will do what you want without the flaw with
the Control+Click routine.

Selection.Sentences(1).Select
If Selection.Characters(1).Font.Superscript = True Then
While Selection.Characters(1).Font.Superscript = True
Selection.MoveStart wdCharacter, 1
Wend
Selection.MoveStart wdCharacter, 1
End If

To see how to assign a macro to a hot key, see the article "How to assign a
Word command or macro to a hot-key" at:

http://www.word.mvps.org/FAQs/Customization/AsgnCmdOrMacroToHotkey.htm


--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP

"removing all headers and footers"
 
R

removing all headers and footers

Hi, thanks. I have now lost the instructions on how to put this code into a
macro? what is that web link? thanks
 
R

removing all headers and footers

This still selects both the sentence the cursor is in and the previous
sentence with the endnote as well. I made it twice and tried it 3 times
 
D

Doug Robbins - Word MVP

Not here it doesn't.

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP

"removing all headers and footers"
 
R

removing all headers and footers

OK, I finally got it to work , using control+\. Is it possible to assign it
to control+click, somehow? thanks for the help
 
D

Doug Robbins - Word MVP

There maybe, but I do not know how to do it. It might actually be easier to
use if you assign the macro to a button on the toolbar. Then there would be
no need for the Ctrl.

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP

"removing all headers and footers"
 

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

Top