[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 157
  • Last Modified:

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
0
Gerald Connolly
Asked:
Gerald Connolly
  • 2
2 Solutions
 
GrahamSkanCommented:
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:
i think i had to do it like that as that was the only way i could get rid of the syntax error
0
 
Gerald ConnollyAuthor Commented:
Not really a solution
0

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now