Etudes C++. WordCount

Up ] GetOLEProps ] Clip2File ] WordCount ] Thanks! ]


Resources

"WordCount.exe" and dynamic library "AhWordCount.dll", 204 Kb, ZIP,  [download].

Description

The utility "Clip2File.exe" is intended for collecting words and styles statistics in the selected Microsoft Word document or in all Microsoft Word documents for the selected folder. Utility uses Microsoft Word as automation server.

 

You can find a more detailed description of the "WordCount.exe" utility in the Etude named "Microsoft Word as Automation Server" in the book "Etudes for Microsoft Word Programmers".
This Etude has not been published yet.

Screenshots

Program version information

The Dialog "About".
Program version information.

Main Window

The main window of the "WordCount.exe".

Words statistics for one document.

The main window of the "WordCount.exe".

Styles statistics for all documents in the selected folder. 

Displaying Statistics

The statistics data is collected and displayed using functions exported by "AhWordCount.dll". Those functions could be called directly from VBA Microsoft Word macros.

Words statistics for a document.
Styles statistics for a document.
Styles statistics for a document.
Saved XML file in the Internet Explorer window.

Output XML File Sample (Words)

  <?xml version="1.0" encoding="UTF-8" ?>
<!--
Created by AhWordCount.dll. Time = May 14, 2007. 16:03:01
  -->
<!--
 2000-2007. Evgeny Akhundzhanov. All rights reserved worldwide.
  -->
<!--
See details on "C++ Etudes" page on http://www.transcriber.ru
  -->
<!--
Words Statistics
  -->
<!--
WordCount.exe reports:
  -->
- <Document>
  <FilePath>Pokonos.doc</FilePath>
- <Words>
  <Word Name="Pocono" Count="18" />
  <Word Name="Poconos" Count="17" />
  <Word Name="Stroudsburg" Count="13" />
  <Word Name="through" Count="10" />
  <Word Name="Delaware" Count="10" />
  <Word Name="shops" Count="9" />
  <Word Name="summer" Count="9" />
  <Word Name="local" Count="8" />
  <Word Name="their" Count="8" />
  <Word Name="around" Count="7" />
  <Word Name="River" Count="7" />
  <Word Name="great" Count="7" />
  <Word Name="music" Count="7" />
  <Word Name="place" Count="7" />
  <Word Name="there" Count="7" />
  <Word Name="Mountain" Count="6" />
  <Word Name="There" Count="6" />
  <Word Name="Shawnee" Count="6" />
  <Word Name="Street" Count="6" />
  <Word Name="fishing" Count="6" />
  <Word Name="cooking" Count="5" />
  <Word Name="dancing" Count="5" />
  <Word Name="favorite" Count="5" />
  <Word Name="Festival" Count="5" />
  <Word Name="foliage" Count="5" />
  <Word Name="Mount" Count="5" />
  <Word Name="Pennsylvania" Count="5" />
  <Word Name="Tannersville" Count="5" />
  <Word Name="people" Count="5" />
  <Word Name="Victorian" Count="5" />
  <Word Name="popular" Count="5" />
  <Word Name="region" Count="5" />
  <Word Name="rides" Count="5" />
  <Word Name="Water" Count="5" />
  <Word Name="small" Count="5" />
  <Word Name="average" Count="5" />
  <Word Name="bands" Count="5" />
  <Word Name="Creek" Count="5" />
  <Word Name="can't" Count="5" />
  </Words>
  </Document>

Output XML File Sample (Styles)

  <?xml version="1.0" encoding="UTF-8" ?>
<!--
Created by AhWordCount.dll. Time = May 14, 2007. 15:45:18
  -->
<!--
 2000-2007. Evgeny Akhundzhanov. All rights reserved worldwide.
  -->
<!--
See details on "C++ Etudes" page on http://www.transcriber.ru
  -->
<!--
Styles Statistics
  -->
<!--
WordCount.exe reports:
  -->
- <Document>
  <FilePath>Mikonos.doc</FilePath>
- <Styles>
  <Style Name="BODY_DEST_AIR TRAVEL" Count="6" />
  <Style Name="BODY_DEST_AREAS_WITHIN" Count="13" />
  <Style Name="BODY_DEST_CLIMATE" Count="6" />
  <Style Name="BODY_DEST_EVENTS" Count="27" />
  <Style Name="BODY_DEST_GENERAL" Count="5" />
  <Style Name="BODY_DEST_NIGHTLIFE" Count="21" />
  <Style Name="BODY_DEST_RESTAURANT" Count="9" />
  <Style Name="BODY_DEST_WHAT_DO" Count="29" />
  <Style Name="Normal" Count="21" />
  </Styles>
  </Document>
 

 

 

Etudes C++. WordCount.


Unless otherwise noted, all materials on this site are
2007-2010 Evgeny Akhundzhanov, All Rights Reserved Worldwide.
www.transcriber.ru | E-mail the Author