Results 1 to 3 of 3
  1. #1
    2 Star Lounger
    Join Date
    Jun 2001
    Posts
    103
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I know that the request might seem weird, but I am working on a very long document and if I could do it my way, it would be easier for me. There are many entries like 12-14, that need to stay together if it gets to the end of the line, but many times I forget to press the right keys and have to go back and fix it, which takes too much time and I lose my train of thought.

    Is there a way to create a macro that when I press the regular hyphen it is a non-breaking hyphen? I am using Word 2003.

    I know that I can press CTRL+SHIFT+- to get a non-breaking hyphen, but I want to simply press the regular hyphen (-) and get a non-breaking hyphen. Is such a thing possible? I tried to record a macro but it did not work. I also checked to see if I could change the keyboard but could not.

    Again, thank you for any response.

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts
    Using VBA code to replace a character while typing might have a serious impact on performance.

    You can easily replace the standard hyphen with a non-breaking hyphen in a document: enter - in the Find what box, and ^~ in the Replace with box (^~ is the Find/Replace code for a non-breaking hyphen), then click Replace All.

  3. #3
    2 Star Lounger
    Join Date
    Jun 2001
    Posts
    103
    Thanks
    0
    Thanked 0 Times in 0 Posts
    [quote name='HansV' post='795175' date='27-Sep-2009 18:23']Using VBA code to replace a character while typing might have a serious impact on performance.

    You can easily replace the standard hyphen with a non-breaking hyphen in a document: enter - in the Find what box, and ^~ in the Replace with box (^~ is the Find/Replace code for a non-breaking hyphen), then click Replace All.[/quote]

    I did not even think of the Find/Replace. Thank you so much.

Posting Permissions

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