Results 1 to 12 of 12
  1. #1
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts

    ZWNBSP (Today's WOW-MM) (Word 2000/SR-1/SP2)

    In today's WOODY's OFFICE FOR MERE MORTALS (sign up here), it is said that you can insert a unicode character by typing:

    FEFF

    and then immediately pressing Alt+X. This does not seem to do anything on my computer. Note: It might be easier to test with 0025 (which should give you a % sign) than the code above, which makes a character that you normally can't see.

    Request: If this works on your computer, can you open the Tools>Customize...>Keyboard... dialog, press Alt+X and tell me what command it is assigned to?

    Workaround: If this turns out to be an XP and higher option, you can insert the ZWNBSP (zero-width non-breaking space) in Word 2000 using a macro like this one:

    <pre>Sub InsertZeroWidthNonBreakingSpace()
    If Selection.Type <> wdSelectionIP Then
    If MsgBox("Replace selection?", vbQuestion + vbYesNo) = vbNo Then Exit Sub
    End If
    Selection.TypeText ChrW(&HFEFF)
    ActiveDocument.ActiveWindow.View.ShowAll = True
    End Sub</pre>

    to which you can assign a keystroke (such as Ctrl+Alt+Spacebar).

    Or, if you prefer an AutoCorrect or AutoText solution, you can enter the unusual gray box character into your document from the VB Editor's Immediate window by pasting in the following and pressing Enter to run it:

    Selection.TypeText ChrW(&HFEFF)

    and then, upon returning to your document, selecting the box (if not visible, use Show All), and saving it as AutoText or an AutoCorrect entry in the usual way.

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: ZWNBSP (Today's WOW-MM) (Word 2000/SR-1/SP2)

    Hi Jefferson, in my Word 2002, Alt+X is assigned by default to the ToggleCharacterCode command. This command is not in the list of Word commands from http://www.mvps.org/word/FAQs/General/CommandsList.htm, so it must be new for Word 2002.

  3. #3
    Plutonium Lounger
    Join Date
    Nov 2001
    Posts
    10,550
    Thanks
    0
    Thanked 7 Times in 7 Posts

    Re: ZWNBSP (Today's WOW-MM) (Word 2000/SR-1/SP2)

    I've looked at the Tools > Customize > Keyboard dialog box but I can't work out how you tell what command is associated with a keystroke?
    (The reverse operation of finding the keystroke for a command is of course trivially easy)

    StuartR

  4. #4
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts

    Re: ZWNBSP (Today's WOW-MM) (Word 2000/SR-1/SP2)

    It's a "warning" feature that you're using not for its original purpose:
    Attached Images Attached Images

  5. #5
    Plutonium Lounger
    Join Date
    Nov 2001
    Posts
    10,550
    Thanks
    0
    Thanked 7 Times in 7 Posts

    Re: ZWNBSP (Today's WOW-MM) (Word 2000/SR-1/SP2)

    Thanks, very useful.
    Mine is the same as Hans'

    StuartR

  6. #6
    Uranium Lounger
    Join Date
    Dec 2000
    Location
    Los Angeles Area, California, USA
    Posts
    7,453
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: ZWNBSP (Today's WOW-MM) (Word 2000/SR-1/SP2)

    Hi Stuart:
    You can also find keyboard commands quickly by pressing Alt+Ctrl+NumPad+ followed by the keyboard command. See <post#=127986>post 127986</post#>

  7. #7
    Plutonium Lounger
    Join Date
    Nov 2001
    Posts
    10,550
    Thanks
    0
    Thanked 7 Times in 7 Posts

    Re: ZWNBSP (Today's WOW-MM) (Word 2000/SR-1/SP2)

    Thanks Phil. I did know that once, but the grey cells seem to be wearing out...

    StuartR

  8. #8
    5 Star Lounger
    Join Date
    May 2001
    Location
    Stuttgart, Baden-W, Germany
    Posts
    931
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: ZWNBSP (Today's WOW-MM) (Word 2000/SR-1/SP2)

    Hi Jefferson,

    The following macro should work somewhat like "ToggleCharacterCode", in Word2000.
    You could assign Alt+X as the shortcut.

    I don't have access to Word2002 right now, so perhaps it works a little differently.
    To keep it simple, the hex numbers have to have four digits (so you'd need to use 006d or 006D for an "m").
    The letter or hex number is selected after the macro has run, but you don't need to select anything before you run it (it toggles the character or hex number to the left of the IP, or at the end of the current selection).
    Running it again toggles back.

    I just hacked it together, so no guarantees...
    BTW, I didn't see anything in WOW-MM (current issue on the web: Feb 7th); do you have the number of the issue by chance?

    <img src=/S/cheers.gif border=0 alt=cheers width=30 height=16> Klaus

    <pre>Sub ToggleCharacterCode2000()
    Dim i
    Dim sLike As String
    sLike = "[0-9a-fA-F][0-9a-fA-F][0-9a-fA-F][0-9a-fA-F]"
    Dim sHexNumber As String
    Dim rngHexNumber As Range
    Selection.Collapse (wdCollapseEnd)
    Set rngHexNumber = Selection.Range
    rngHexNumber.start = rngHexNumber.start - 4
    If rngHexNumber.Text Like sLike Then
    rngHexNumber.Text = ChrW("&H" & rngHexNumber.Text)
    Else
    rngHexNumber.start = rngHexNumber.End - 1
    sHexNumber = AscW(rngHexNumber.Text)
    sHexNumber = Hex(sHexNumber And &HFFFF&)
    While Len(sHexNumber) < 4
    sHexNumber = "0" & sHexNumber
    Wend
    rngHexNumber.Text = sHexNumber
    End If
    rngHexNumber.Select
    End Sub</pre>


  9. #9
    Uranium Lounger
    Join Date
    Dec 2000
    Location
    Los Angeles Area, California, USA
    Posts
    7,453
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: ZWNBSP (Today's WOW-MM) (Word 2000/SR-1/SP2)

    <hr>grey cells seem to be wearing out<hr>
    Grey cells--grey cells. That's what they have in my retirement home. <img src=/S/rofl.gif border=0 alt=rofl width=15 height=15>

  10. #10
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts

    Re: ZWNBSP (Today's WOW-MM) (Word 2000/SR-1/SP2)

    <P ID="edit" class=small>(Edited by jscher2000 on 25-Apr-03 11:08. Fixed line wrapping in the attachment. Paste into a mail message to bring the links to life.)</P>Thanks, Klaus. I haven't tried that one yet. I am attaching the newsletter as text.
    Attached Files Attached Files

  11. #11
    5 Star Lounger
    Join Date
    May 2001
    Location
    Stuttgart, Baden-W, Germany
    Posts
    931
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: ZWNBSP (Today's WOW-MM) (Word 2000/SR-1/SP2)

    Hi Jefferson,

    Thank you -- didn't get that edition yet, and it was very interesting.

    OT: Woody's {eq} field avoids all hyphenations.
    Jack Lyon's method of inserting a FEFF (zero-width no-break space) where you don't want Word to hyphenate works well -- but Word will never hyphenate the part that follows the FEFF.

    So if you inserted it at unbe(U+FEFF)lievable to avoid the hyphenation unbe-lievable, Word will still hyphenate un-believable, but never unbelie-vable (at least in my Word2000).

    If you want to allow hyphenation points after the U+FEFF (or in fact anyplace where Word wouldn't usually hyphenate), you could do that with combinations of the two characters U+FEFF and 1F (optional hyphen = Ctrl+Hyphen).
    (slightly edited *twice* because the original combinations didn't work right)

    But that's so geeky I doubt I'll ever use it <img src=/S/grin.gif border=0 alt=grin width=15 height=15>

    All this seems more like "dirty tricks" than proper use of the Unicode character FEFF, since FEFF really marks a word boundary... no wonder that Word puts a red squiggly line under most words if you insert it.

    <img src=/S/cheers.gif border=0 alt=cheers width=30 height=16> Klaus

  12. #12
    5 Star Lounger
    Join Date
    May 2001
    Location
    Stuttgart, Baden-W, Germany
    Posts
    931
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: ZWNBSP (Today's WOW-MM) (Word 2000/SR-1/SP2)

    That's so embarrassingly stupid that I'm tempted to delete the previous message and hide under a stone for the rest of the weekend.

    The optional hyphen alone does quite well anywhere to allow Word to hyphenate ("unb-elievable").
    No combinations with FEFF needed.

    Together with the optional hyphen (Ctrl+hyphen) and its twin brother, 200B (zero-width space), FEFF (zero width no-break space) should take care of all hyphenation problems.

    You can use 200B to make Word line-wrap where it usually wouldn't do so (for example after the slash / in "national/international trade", or in URLs).

    <img src=/S/cheers.gif border=0 alt=cheers width=30 height=16> Klaus

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •