Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 03-13-2016, 09:07 AM
dherr dherr is offline Word2007; a strange effect Windows 8 Word2007; a strange effect Office 2007
Advanced Beginner
Word2007; a strange effect
 
Join Date: Nov 2014
Location: Austria
Posts: 45
dherr is on a distinguished road
Default Word2007; a strange effect

Hi,
I've done the following with a larger text:


Set oDoc = Active.Document
then
Worte = oDoc.ComputeStatistics(wdStatisticWords) [result: 3340]
Absatz = oDoc.ComputeStatistics(wdStatisticParagraphs) [result: 67]
then
Worte = oDoc.Words.Count [result: 4343]
Absatz = oDoc.Paragraphs.Count [result: 80]

The differences are huge. Why?

Cheers-
Dietrich
Reply With Quote
  #2  
Old 03-13-2016, 01:38 PM
gmaxey gmaxey is offline Word2007; a strange effect Windows 7 32bit Word2007; a strange effect Office 2010 (Version 14.0)
Expert
 
Join Date: May 2010
Location: Brasstown, NC
Posts: 1,421
gmaxey is a jewel in the roughgmaxey is a jewel in the roughgmaxey is a jewel in the roughgmaxey is a jewel in the rough
Default

Words.Count returns what you and I would consider words and punctuation and paragraph marks. wdStatistiWords returns words.

Paragraphs.Count returns all paragraph "containers" where wdStatisticsParagraphs returns only containers containing text.
__________________
Greg Maxey
Please visit my web site at http://www.gregmaxey.com/
Reply With Quote
  #3  
Old 03-13-2016, 03:03 PM
dherr dherr is offline Word2007; a strange effect Windows 8 Word2007; a strange effect Office 2007
Advanced Beginner
Word2007; a strange effect
 
Join Date: Nov 2014
Location: Austria
Posts: 45
dherr is on a distinguished road
Default

Thank you very much, Greg!
Reply With Quote
  #4  
Old 03-13-2016, 03:22 PM
gmaxey gmaxey is offline Word2007; a strange effect Windows 7 32bit Word2007; a strange effect Office 2010 (Version 14.0)
Expert
 
Join Date: May 2010
Location: Brasstown, NC
Posts: 1,421
gmaxey is a jewel in the roughgmaxey is a jewel in the roughgmaxey is a jewel in the roughgmaxey is a jewel in the rough
Default

You are very much welcome.
__________________
Greg Maxey
Please visit my web site at http://www.gregmaxey.com/
Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Can't use RTF Textbox in Userform (Word2007) dherr Word VBA 2 03-16-2015 07:50 AM
How to unprotect and search a Word2007 doc? pstein Word 1 05-31-2013 02:50 AM
Word2007; a strange effect Where can I see the Word2007 doc properties (author,...)? pstein Word 1 03-26-2012 03:01 PM
Word2007; a strange effect Create popup box when closing Word2007 ghillie30 Word 2 07-12-2011 06:20 AM
Word2007 to email merge bhalliday Mail Merge 2 06-18-2009 02:25 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 07:34 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