#1
|
|||
|
|||
Word Count Macro
I got this Word Count macro that I copied from somewhere. It works very well but I have forgotten how it works. All I remember is that it appears to count the number of words in a section or in a part of a section. I have a bookmark called abstract that it uses to identify where to start or stop counting. Can anyone figure this out?
Code:
Sub AbstractWordCount() ' ' AbstractWordCount Macro ' ' Dim oRange As Word.Range Dim sBookmarkName As String Dim sTemp As String sBookmarkName = "abstract" With ActiveDocument sTemp = " " + Format(.Sections(3).Range.Words.Count, "0") Set oRange = .Bookmarks(sBookmarkName).Range oRange.Delete oRange.InsertAfter Text:=sTemp .Bookmarks.Add Name:=sBookmarkName, Range:=oRange End With End Sub Last edited by macropod; 01-29-2013 at 08:45 PM. Reason: Added code tags & formatting |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Word count question | Wuffybrother | Word | 3 | 03-22-2019 03:40 AM |
Where did live word count go? | Tango Mike | Word | 3 | 08-01-2012 09:34 PM |
Word Count in Excel | dallas | Excel | 1 | 11-23-2011 09:20 AM |
*Word 2007 Macro for Character Count | gbartlet | Word | 0 | 07-21-2010 11:12 AM |
changing word count | hamster | Word | 3 | 06-03-2010 01:53 AM |