View Single Post
  #3   Report Post  
Posted to microsoft.public.word.mailmerge.fields
[email protected] andy.cotgreave@gmail.com is offline
external usenet poster
 
Posts: 9
Default Inserting a field to count number of words in previous paragraph

On Mar 21, 1:04 pm, "Doug Robbins - Word MVP"
wrote:
It can't be done with fields alone. You could use a DOCVARIABLE field and
then use VBA to load the number of words into the variable

To get the number of words in the ith paragraph of the document, you would
use


Hi Doug,
Thanks for the suggestion - sounds good.

One question remains, though! Each field needs to refer to the
paragraph above it - how do I work out the number of the paragraph in
the document relative to the position of the field?

Thanks

Andy