View Single Post
  #24   Report Post  
Posted to microsoft.public.word.docmanagement
Graham Mayor Graham Mayor is offline
external usenet poster
 
Posts: 19,312
Default "Transpose" macro Hebrew / right-to-left text

Exactly! If a user selects more than 2 characters, the macro cannot
determine which, if any, of those characters are the two to be transposed so
would produce an error condition. The message alerts the user to that error.

Greg has pointed out that my macro required the Word option 'Typing Replaces
Selected Text' setting (this is the default condition). To overcome this he
has suggested a minor change which I have added to my web page version this
morning. If you have the option set you won't notice any difference with the
modified version.

--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org



Peter T. Daniels wrote:
Ah -- you were simply saying that you made a little change to let the
user know that selecting _more_ than two characters wouldn't work.

On Oct 12, 9:11 am, "Graham Mayor" wrote:
What I mean by not between 2 characters is where the cursor before
the first character of the current paragraph or after the last, or
if there is no document open or an empty document. If you select one
or more than two characters you do indeed get that warning message
as the macro will only handle two character transpositions. You can
change the wording if you prefer, but as you wanted the cursor to
work from between the characters the message simply reminds of that
requirement. The error trapping messages are primarily concerned
with accidental applications of the macro in inappropriate locations.

I'll have a look at the web page instructions re the QAT vis-a-vis
the shortcut key. However the macroname should appear in the right
window of the shortcut key editor, when macros are selected in the
left.

--

Graham Mayor - Word MVP

My web sitewww.gmayor.com
Word MVP web sitehttp://word.mvps.org




Peter T. Daniels wrote:
Ok, I tried it, and it does transpose either two selected letters or
the letters the cursor is between (so it works perfectly), but
selecting three letters produced only the message "You must place
the cursor between the 2 characters to be transposed!"


On Oct 12, 8:48 am, "Peter T. Daniels"
wrote:
I don't understand what you mean by "where the cursor is not
located between the two characters" -- does that simply mean that
it works by selecting two characters? And the following phrase
means it will reverse the sequence of any number of selected
characters? (Both those qualifications don't appear in the website
description.)


I'll replace yesterday's macro with this one, so thank you again!


Also, I noticed a tiny glitch in your "installing macros"
instructions yesterday. I don't need to put Transpose on the QAT,
but I do want a keyboard shortcut. The instructions give the
impression that you need a button on the QAT to assign a shortcut
to a macro, but t turns out you don't -- just skip the step to add
it to the QAT and go on to click the Shortcut button. (However, the
name of the macro does _not_ appear in the shortcut-assigning
panel, as I'm accustomed to seeing when I assign a shortcut to a
character.)


On Oct 12, 1:54 am, "Graham Mayor"
wrote:


Following up with the revised version of the transposition macro I
mentioned yesterday: The following will transpose either two
selected characters or the characters either side of the cursor
and allows for those cases where the cursor is not located
between two characters or more than two characters are selected.
The cursor is left between the transposed characters so repeated
use of the macro will toggle the transposition back and forth. I
have added this version to my web-