Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #14  
Old 02-28-2020, 03:20 AM
macropod's Avatar
macropod macropod is offline Using find and replace to insert an extra space after full stops Windows 7 64bit Using find and replace to insert an extra space after full stops Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,467
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

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]
Reply With Quote
 



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
Using find and replace to insert an extra space after full stops Code to find numerical string + space throughout document & replace them with Comma Robert Kay Word VBA 6 02-21-2018 04:41 PM
Using find and replace to insert an extra space after full stops 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

Other Forums: Access Forums

All times are GMT -7. The time now is 02:04 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft