Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 01-31-2018, 12:46 PM
Regev Regev is offline Revisions Sentences Word Count Windows 10 Revisions Sentences Word Count Office 2016
Novice
Revisions Sentences Word Count
 
Join Date: Jan 2018
Posts: 1
Regev is on a distinguished road
Question Revisions Sentences Word Count

Hi,

So I've been breaking my head over this for a while now, perhaps somebody here will have an idea how to overcome this.

What I'm trying to achieve is to get a word count from Word, using a macro, to count words of entire sentences, but ONLY for sentences that have revisions ("Track Changes") within them.

This means, the following logic should apply:
1. Look for sentences which have revisions within them (additions or deletions).
2. Count the words of these sentences only
3. Display results



Sounds pretty simple, right? Here's where it get's messy.

First, Word insists on counting paragraphs and line breaks as words. Than, it appears that if I backspace a line up, Word would count the entire line (not sure about the tech logic behind this one). So basically, this produces very inaccurate words counts.

I'm sure there's a simple way to write a macro to handle such a task, but so far I couldn't achieve or find anything to deliver the wanted results.

Perhaps you'll be able to assist?

Thanks in advance!
Reply With Quote
  #2  
Old 01-31-2018, 01:06 PM
macropod's Avatar
macropod macropod is offline Revisions Sentences Word Count Windows 7 64bit Revisions Sentences Word Count Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,963
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

I don't think you're going to get what you're after, even if you address the issues of paragraph breaks and line breaks. That's because VBA has no idea what a grammatical sentence is. 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.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
Reply

Tags
revisions, track changes, word count macro



Similar Threads
Thread Thread Starter Forum Replies Last Post
Revisions Sentences Word Count problem with MS word merging words and sentences aretai Word 5 07-17-2018 12:32 AM
Revisions Sentences Word Count How to open the Revisions pane? billy8b8 PowerPoint 4 12-17-2014 04:22 PM
Revisions Sentences Word Count sentences are incomplete in word 2007 jirado Word 1 11-09-2014 01:32 PM
Find/Replace, Duplicating a word in a sentence to hundreds of sentences. DDDD Word 0 10-08-2013 10:48 AM
Revisions Sentences Word Count how to insert 3 sentences at top, center and bottom in word 2010 fay Word 1 05-19-2012 02:07 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 12:47 AM.


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