#1
|
|||
|
|||
Using find and replace to insert an extra space after full stops
Hi there,
One of my clients is using the archiac two spaces after a full stop - but she hasn't done this consistently throughout the document. I've been trying to work out how to use advance F&R to put the extra space in where she's missed them, but I can't get it right. Can anyone help? I'm using Word for Mac, version 16.34, ie the most up to date version. Thanks, Johanna |
#2
|
|||
|
|||
Try doing a wild card Search/Replace operation with:
Find : ^46^32([!^32]) Replace: ^46^32^32\1 |
#3
|
|||
|
|||
Thanks Robert - that doesn't work though - it switches the capital letter at the start of the new sentence with the two spaces.
So where the text did read: nurses. Predicting it now reads: nursesP. redicting And what I need is: nurses. Predicting (*e2a* the forum seems to remove the extra space from this!) Any other ideas at all? Thanks! |
#4
|
|||
|
|||
The wild card pattern I gave does work as intended in Word 2007 under Windows 10.
I just tested it with “nurses. Predicting ”. Maybe things work differently in Word 2019? I doubt it, but it is a possibility. Are you sure that you used the exact patterns I gave? Did you use copy/paste to enter them? |
#5
|
|||
|
|||
Quote:
Same issue for me here, except I'm not on the newest version but 2010 for Windows. The boss wants double spaces, but most of the newer engineers are haphazard at best about using them. The best I've been able to do so far is: 1. Find ". " and replace with ". " (replace full stop-single space with full stop-double space): Replace All. 2. Then Find ". " and Replace with ". " (replace full stop-three spaces, for any that were done correctly, with full stop-two spaces): Replace All. 3. Then either eyeball for any double spaces after the stop for, say, the middle initial of someone's name, the stop after Mr, Ms, Inc, etc, or if you were going to write a macro you could add those exceptions and restore them from ". " to ". ". More often than not, I run the Find/Replace manually, using Find Next to visually look and see if the replace is needed, but this gets tedious in a 20-30 page document. In my version, under File/Options/Proofing/When correcting spelling and grammar in Word... there is a setting under Grammar to check on spaces required between sentences. You can default it to 1 or 2. --Ann |
#6
|
|||
|
|||
Quote:
I did indeed copy and paste. Strange! Perhaps it is a change between Word versions, although, as you say, this seems unlikely. |
#7
|
|||
|
|||
Thanks Ann, I'll try that!
Quote:
That's really helpful - I think I did used to know that, but forgot. So thanks for reminding me. |
#8
|
|||
|
|||
Sadly Ann's method doesn't work either - just searching for a full stop followed by a single space finds all the full stops followed by double spaces, as they are technically followed by a single space - and then another single space!
Any other ideas? |
#9
|
|||
|
|||
The wild card Find pattern that I suggested means “search for a period character followed by a space character, itself followed by any character that is not a space character”. This should normally rule out double space characters.
Maybe your period characters or your space characters are special and don’t correspond to HTML entities ^46 and ^32. Could you post a short sample document illustrating this problem? |
#10
|
||||
|
||||
The archaic 'two spaces' after sentences rule belongs to the days of typewriters and fixed-width fonts. It has no place in documents using proportional fonts and/or justification.
Moreover, the process discussed above doesn't limit itself to periods at the end of sentences - it also affects every abbreviation that ends with a period. Far simpler is the deletion of those quite unnecessary spaces.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#11
|
|||
|
|||
Quite so! How to apply them consistently may be an interesting brain-teaser, but shouldn't really be a "need to fix this" question these days.
|
#12
|
|||
|
|||
I agree, but it's what the client wants.
Does anyone have another solution? I've managed to switch on the 'check two spaces after full stop' button, as per Ann's suggestion, but that only works intermittently, unfortunately. |
#13
|
||||
|
||||
There is no simple programming solution for this. Although VBA has a 'sentences' collection, that has no correlation with grammatical sentences. For example, consider the following:
Mr. Smith spent $1,234.56 at Dr. John's Grocery Store, to buy: 10.25kg of potatoes; 10kg of avocados; and 15.1kg of Mrs. Green's Mt. Pleasant macadamia nuts. For you and me, that would count as one sentence; for VBA it counts as 5 sentences. You might be able to use Greg Maxey's 'Sentence Deducer' Addin (Deduced Sentences) to help work out where grammatical sentences end. See also his code in: https://www.msofficeforums.com/97131-post14.html
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#14
|
|||
|
|||
Ok, thanks Paul. I feel a bit less dense that there isn't an easy answer! For now I'll just keep eyeballing them I guess!
|
#15
|
|||
|
|||
For a manual solution, in Replace, find .[space] and Replace with .[space][space] and do not hit Replace All. Rather find the first and use the Replace button to go through a document one at a time. Still likely to to be quicker and easier than just going through the document by eyeball.
|
Thread Tools | |
Display Modes | |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Macro for Find/replace to remove space before Hard Return | AlfredStreich | Word VBA | 4 | 01-23-2020 03:59 PM |
Code to find numerical string + space throughout document & replace them with Comma | Robert Kay | Word VBA | 6 | 02-21-2018 04:41 PM |
Find and Replace with space | cheech1981 | Word | 3 | 03-29-2017 02:33 PM |
Mac 2011 Word find/replace stops working | jondic | Word | 0 | 08-31-2016 02:58 AM |
Wildcard Find/Replace deletes extra character | Cosmo | Word | 1 | 06-20-2014 08:49 AM |