Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 03-24-2023, 10:41 PM
Bunnelope Bunnelope is offline Macro to identify and fix long sentences without commas Mac OS X Macro to identify and fix long sentences without commas Office 2021
Novice
Macro to identify and fix long sentences without commas
 
Join Date: Mar 2023
Posts: 5
Bunnelope is on a distinguished road
Default

To make it simple, here is a demo of the macro I currently have, and a demo of what I want to do. There are 2 problems with the macro that I have:



1. It identifies too many sentences (see demo)

2. It identifies sentences with 30+ words (I want it triggered at 25+ words)



Example sentence without using macro:



Sam woke up Thursday. He went to the bank and withdrew two hundred dollars before going to the store and buying a turkey for Thanksgiving dinner at his grandparents house in Tallahassee Florida on Thanksgiving day in 2019. He was nervous about going, because he hadn't seen his grandparents in a while, and they had a big, scary, mean dog, that was known to bite.



Example sentence using "Mark_LongSentences" macro: (this macro gets triggered at 30+ word sentences but I only need it to be at 25+ word sentences.



Sam woke up Thursday. He went to the bank and withdrew two hundred dollars before going to the store and buying a turkey for Thanksgiving dinner at his grandparents house in Tallahassee Florida on Thanksgiving day in 2019. Finally the time had come. Sam was nervous about going, because he hadn't seen his grandparents in a while, and they had a big, scary, mean dog, that was known to bite, and might even have rabies.



Notice that it marked both long sentences, including the one with many commas. I don't want that. I only want it to mark the one that has a stretch of 25+ words without commas.



Example sentence using my fantasy macro that does what I want it to do:
Sam woke up Thursday. He went to the bank and withdrew two hundred dollars before going to the store and buying a turkey for Thanksgiving dinner at his grandparents house in Tallahassee Florida on Thanksgiving day in 2019. Finally the time had come. Sam was nervous about going, because he hadn't seen his grandparents in a while, and they had a big, scary, mean dog, that was known to bite, and might even have rabies.



Notice how it only identified the first long sentence. Second one is fine because the 25+ word stretch is broken up into phrases with commas.
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Macro to identify and fix long sentences without commas Macro to select multiple sentences that contain a specific word MauiTruss Word VBA 7 10-03-2018 03:46 PM
Macro to identify and fix long sentences without commas Macro to number sentences tjf816 Word VBA 10 03-29-2017 05:42 PM
A Widlcard or Macro to Properly Remove Spaces Between Commas? CrossReach Word 6 01-23-2017 04:28 AM
Macro to identify and fix long sentences without commas Need a Macro that Combines Every 5 sentences into a paragraph jgarland Word 22 01-11-2012 11:19 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 05:59 AM.


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