Counting words in Word

I currently have a field in my document (my college assignment) that shows the word count minus the preamble (cover page and TOC) and the postamble (bibliography etc), it looks like this

 
Word Count: [ {={NUMWORDS\# "#,##0" } - 63 -132 } ]

Open in new window


i know i could just write -195, but its easy to think in pre and post amble terms.

What i would like to do is to use some kind of variables that i can set in the document properties, i have tried this

{{{ SET "iSizePre" "63" }{ SET "iSizePos" "132" }{={NUMWORDS\# "#,##0" } - { REF "iSizePre" } - {REF "iSizePos" }}}}

Open in new window


But it doesnt display anything, what am i doing wrong?

Oh and i am using Word 2007 SP2
LVL 17
Gerald ConnollyAsked:
Who is Participating?
 
Gerald ConnollyAuthor Commented:
i think i had to do it like that as that was the only way i could get rid of the syntax error
0
 
GrahamSkanRetiredCommented:
You seem to have doubly nested the result in otherwise empty outer fields. Also, if you want to use the number format switch, format the result, not one of components of the calculation.

{SET "iSizePre" "63"  }{ SET "iSizePos" "132" }{ ={ NUMWORDS} -  REF "iSizePre" }{  - {REF "iSizePos"  }  \# "#,##0"}

0
 
Gerald ConnollyAuthor Commented:
Not really a solution
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.