Ed
Wed Jan 07 08:47:48 CST 2004
Thanks, Jonathan. I think that's exactly what I need.
Ed
"Jonathan West" <jwest@mvps.org> wrote in message
news:eMy1rtS1DHA.1684@TK2MSFTNGP12.phx.gbl...
> Hi Ed,
>
> Yes, you can, but furst you need to define what you mean by a "word". For
> instance is "apple-pie" one word or two?
>
> If you want to take the simplest case of words being separated by spaces,
> then the following line of code will do the trick
>
> numWords = UBound(Split(stringWithWords, " ")) + 1
>
> --
> Regards
> Jonathan West - Word MVP
>
http://www.multilinker.com
> Please reply to the newsgroup
>
>
>
> "Ed" <ed_millis@removethis.hotmail.com> wrote in message
> news:e2bgFSS1DHA.1700@TK2MSFTNGP12.phx.gbl...
> > I have used Len(strVariable) to get the length of my text string in
> > characters. Can I also get the length in "words", or get a count of how
> > many words are contained in that string?
> >
> > Thanks for all your help.
> > Ed
> >
> >
>