Hello Again, When I created my last message I switched from plain text format to HTML. It appears that additional lines might have been added in my message. If you use the macro there should not be any blank lines between the lines of code.
Take care. Brian Lee [email protected] -----Original Message----- From: JAWS-Users-List [mailto:[email protected]] On Behalf Of Brian Lee Sent: March 21, 2017 7:42 PM To: [email protected] Subject: Re: [JAWS-Users] Deleting extra blank lines in Word doc Hello Wayne, You are likely pressing Shift with 5, which is the percent sign. I have a couple extra suggestions for you. I am using Word 2013 but Word 2010 and 2016 should be quite similar to the information I am showing in this message. First of all, many times text that you copy from places like web sites have linefeeds and not paragraph marks. You can use caret with l in the find and replace box in addition to using the caret with p. If you put ^l^l in the find what box and replace that with ^p you might get rid of the linefeeds. You might need to do that a couple of times. You can then use ^p^p in the Find What box and ^p in the Replace With box and then use the Replace All to clear them. I have a macro that removes all blank lines in a document where paragraph marks are used. I have applied it to a hotkey combination so every time I want all blank lines removed I run the macro using the hotkey. If you do a lot of pasting information from the web or other sources you might consider taking the time for setting up this macro. If you paste text infrequently then you might just want to use Find and Replace to eventually get rid of all blank lines. After running the macro all blank lines are removed but proper wrapping might not be in place. You could then do a Find and Replace for ^p (one only) in the Find What box and a space in the Replace with box to get wrapping correct. In order to use the macro you first have to do the following: 1. In Word press Alt F followed by Alt T. 2. Press the End key to move to the bottom category in the list, which should be the trust center settings. 3. Tab across to the settings button and press spacebar. 4. In the resulting list of categories use up or down arrow key to find Macros. 5. Tab and you should have the radio button for disabling all macros without notification selected. 6. Tab again to the Trust access to the VBA project object model and check it by using the spacebar if it is not checked already. 7. Use the Close and OK buttons until out of the dialogs and menus. Create a new macro and make it available in the normal template. Do this as follows: 1. Select and copy the code shown at the end of this message. Make sure all code is selected. One way to do this is to put a place marker at the very beginning of the code using Windows key with CTRL key and K. Navigate down to the very end of the code and press JAWS key with spacebar followed by M. Use CTRL C to copy it to the clipboard. 2. When in Word press Alt key with F8. 3. In the edit/combo box type the name for the macro. Capitalize all words in the name and use no spacing between words). You might call it something like RemoveAllBlankLines. 4. Tab across to the Macros In box and have it set on All Active Templates and Documents. 5. Tab to the Create button and depress it. 6. Use CTRL+V to paste the code. 7. Use CTRL+Home to go to the top of the window. The top line should be the name of the macro. The next line should be the first line of the macro, in this case Sub ReplacePara(). 8. After pasting you might find that this first line is repeated. In this case select the first occurrence of Sub RemovePara() and blank line after it if it exists and delete them. There should be just one occurrence of Sub RemovePara () and it should be at the very beginning of the macro after the macro name. 9. Go to the bottom of the document by using CTRL with the end key. There should be only one line at the bottom that says End Sub so if when you arrow up you find another occurrence of that line then select it and delete it. 10. Check your window against the code below to make sure it is exactly the same. 11. Press CTRL+S to compile the code. 12. Use Alt+F4 to close the visual basic editor. Here is the code to paste. After the code are steps for applying the macro to a hotkey. Sub ReplacePara() Selection.HomeKey Unit:=wdStory Selection.Find.ClearFormatting With Selection.Find .Text = "^p^p" .Replacement.Text = "" .Forward = True .Wrap = wdFindContinue .Format = False .MatchCase = False .MatchWholeWord = False .MatchWildcards = False .MatchSoundsLike = False .MatchAllWordForms = False End With Selection.Find.Execute While Selection.Find.Found Selection.MoveRight Unit:=wdCharacter, Count:=1 Selection.TypeBackspace Selection.MoveLeft Unit:=wdCharacter, Count:=2 Selection.Find.Execute Wend End Sub After closing the VBA editor you can apply the macro to a hotkey by doing the following: 1. When in a document in Word use Alt F followed by Alt T to go into the Word options. 2. Press C or arrow down to the Customize ribbon category. 3. Tab to the Customize button and press spacebar. 4. In the resulting list of categories press M until you find Macros. 5. Tab to the list of macros and select the one you created. 6. Tab to the New Shortcut Key box and use something like Alt CTRL Shift B. 7. Tab to the list of templates and make sure Normal.DOTM is selected. 8. Tab to the Close button and press spacebar. 9. Tab to OK and use spacebar. Using the shortcut key will cause all blank lines to be removed from any text you paste from other sources when the blank lines are caused by paragraph marks. After running the macro if lines in places don't wrap correctly you can select text and use Find and Replace to replace a single ^p with a space. Another bothersome thing that happens when pasting text from sources like the web is that sometimes there are blank spaces at the beginning of lines. This can be fixed by selecting the text, centering it by using CTRL E and then immediately left aligning it using CTRL L. Take care. Brian Lee [email protected] -----Original Message----- From: JAWS-Users-List [mailto:[email protected]] On Behalf Of wayne smith Sent: March 21, 2017 12:57 PM To: [email protected] Subject: Re: [JAWS-Users] Deleting extra blank lines in Word doc Adrian, when I open the find and replace and type in the shift-6 I get the percent sign, %, so what am I doing wrong? Thanks for your patience. Wayne -----Original Message----- From: JAWS-Users-List [ <mailto:[email protected]> mailto:[email protected]] On Behalf Of Adrian Spratt Sent: Monday, March 20, 2017 9:53 PM To: <mailto:[email protected]> [email protected] Subject: Re: [JAWS-Users] Deleting extra blank lines in Word doc Wayne, The search term for the paragraph mark is ^p That is, shift-6 on the number row followed immediately by the letter p. You could put six of those two-character symbols in the "search" field and either one or two in the "replace field. If you run into problems, please post again. -----Original Message----- From: JAWS-Users-List [ <mailto:[email protected]> mailto:[email protected]] On Behalf Of wayne smith Sent: Monday, March 20, 2017 7:07 PM To: <mailto:[email protected]> [email protected] Subject: [JAWS-Users] Deleting extra blank lines in Word doc Hello- I think this may have been answered before but I can't find it. I am copying and pasting lists from a website into a MS Word 2007 or 2010 doc and I am left with about 6 blank lines before and after each line of text. How can I get rid of the extra blank lines? Thanks in advance for any help. Wayne For answers to frequently asked questions about this list visit: <http://www.jaws-users.com/help/> http://www.jaws-users.com/help/ For answers to frequently asked questions about this list visit: <http://www.jaws-users.com/help/> http://www.jaws-users.com/help/ For answers to frequently asked questions about this list visit: <http://www.jaws-users.com/help/> http://www.jaws-users.com/help/ For answers to frequently asked questions about this list visit: http://www.jaws-users.com/help/ For answers to frequently asked questions about this list visit: http://www.jaws-users.com/help/
