
vba problem word 97 and not word 2000
Hi Frank
It looks to me like you have got some parts of the longer lines of code
mixed up.
Try this.
StatusBar = "Counting..."
System.Cursor = wdCursorWait
a = myrange.ComputeStatistics(Statistic:=wdStatisticCharactersWithSpaces)
MsgBox a & " chars"
--
Regards
Jonathan West - Word MVP
MultiLinker - Automated generation of hyperlinks in Word
Conversion to PDF & HTML
http://www.multilinker.com
Word FAQs at http://www.multilinker.com/wordfaq
Please post any follow-up in the newsgroup. I do not reply to Word questions
by email
Quote:
> Hello,
> I use this to count the amount of characters in a word document.
> The strange thing is, sometimes the result is not correct, even negative
> numbers
> This appears in word97 SR2 and not anymore in word2000.
> Does anyone now if that was a bug,
> and if it was a bug, is there a patch or something to solve that bug.
> StatusBar = "Counting..."
> System.Cursor = wdCursorWait
> a =
myrange.ComputeStatistics(Statistic:=wdStatisticCharactersWithSpaces)
Quote:
> & " chars"
> MsgBox
> myrange.ComputeStatistics(Statistic:=wdStatisticCharactersWithSpaces)
> Many Thanks,
> Frank Scheldeman.