View Single Post
 
Old 03-20-2017, 03:04 PM
macropod's Avatar
macropod macropod is offline Windows 7 64bit Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,467
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Basically, the code goes through all the <value> ... </value> strings and uses UBound(Split(.Text, " ")) to count the number of spaces. The number of words is one more than that, hence: i = i + 1 + UBound(Split(.Text, " ")).
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote