Hi all,
I am a Dutch, professional literary writer and I created a macro that helps me to count the words and pages of the book I am currently writing. For various reasons I chose not to use the regular built-in word counting tool for this goal. I use Windows XP, Word 2003 and VB 6.3. I wrote a macro, in which I would like the words and pages to be displayed with a (European) thousands separator in a Message Box. Now it will read in my Message Box: Words: 13456 or 123456 and I want it to read 13.456 or 123.456.
My regional settings are Dutch. The normal built-in word counting option in the Tools menu of Word 2003 does work well: it uses the regular European thousands separator and will read 13.456 for 13456 or 123.456 for 123456, but my message box numbers won't. Is there a way to change this behaviour? I tried the FontNumbers option, but without success.
Here is my macro (I changed Dutch into English or 'My Text'):
Sub CountWords()
MsgBox "Pages: " & Selection.Information(wdNumberOfPagesInDocument) & vbCrLf _
& "Words: " & ActiveDocument.Range.ComputeStatistics(wdStatisticWords) _
& vbCrLf & vbCrLf & "My Text", vbOKOnly, "My Text"
End Sub
Thanks in advance,
Alfred
PS I am not an expert in programming at all, so I would prefer to just get some lines of code I could add to the above macro that will force the counted pages and words to use a thousands separator |