RBM
Fri Nov 21 10:17:18 CST 2003
Danke schoen
"Cindy M -WordMVP-" <C.Meister-C@hispeed.ch> wrote in message
news:VA.00008bf8.00b41fa2@speedy...
> Hi Rbm,
>
> > Usually less than 255 characters. Why?
> >
> Because using VBA activeDocument.Formfields("Name").Result = "the text"
balks
> when you try to write more than 255 characters into a form field.
>
> In this case, you should be able to do something like this (off the top of
my
> head):
>
> lPosOld = 1
> lPos = 1
> Set ffld = ActiveDocument.FormFields("Name")
> szFieldContent = ffld.Result
> Do
> lPos = InStr(lPos, szFieldContent, ". ") + 1
> If lPos > 1 Then
> szNewContent = szNewContent & _
> Mid(szFieldContent, lPosOld, lPos) & _
> UCase(Mid(szFieldContent, lPos+1, 1)
> lPos = lPos + 1
> lPosOld = lPos
> End if
> Loop While lPos > 1
> ffld.Result = szNewContent
>
>
> > > > Is it possible to set up a Word 2002 form field such that sentences
> > beyond
> > > > the first one entered into the field begin with a capital letter? I
use
> > > > fields that contain multiple sentences not infrquently and the first
> > letter
> > > > issue is easily tackled with the "First Capital" setting for the
first
> > > > sentence only. The setting appears not to be carried through to
> > subsequent
> > > > settings, however. Any help or pointers appreciated.
> > > >
> > > About the only thing I can imagine would be a macro that is triggered
when
> > > you exit that would go through the form field's text and use UCase on
the
> > > first character after every period-space combination... How much text
do
> > you
> > > type in these fields? More than 255 characters?
> > >
>
> Cindy Meister
> INTER-Solutions, Switzerland
>
http://homepage.swissonline.ch/cindymeister (last update Sep 30 2003)
>
http://www.mvps.org/word
>
> This reply is posted in the Newsgroup; please post any follow question or
> reply in the newsgroup and not by e-mail :-)
>