Group:  Microsoft Word ยป microsoft.public.word.vba.userforms
Thread: Long Fill in

DotNetBag
.NET Development Newsgroups

HTVi
TV Discussion Newsgroups

Our Hot Pick: Rising Antivirus 2006 - Certified by TUV & Checkmark! Get 10% discount by entering this coupon code: ONDISCOUNT10
Rising Antivirus 2006

Long Fill in
"kcholly" <kcholly[ at ]hvc.rr.com> 07.02.2006 01:12:53
I have a form that the field I use to capture data is not large enough. I
remember seeing a web site that explained how to set it. Ex. like a police
report. Does anyone remember the web address.
Thanks


Re: Long Fill in
"Doug Robbins - Word MVP" <dkr[ at ]REMOVETHISmvps.org> 07.02.2006 05:10:23
' Macro created 05/09/98 by Doug Robbins to insert long string into
FormField

'

FillText = "Your long string"

LenFillText = Len(FillText)

FirstBit = Left(FillText, 255)

If LenFillText > 255 Then

SecondBit = Mid(FillText, 256, LenFillText - 255)

ActiveDocument.FormFields("Text1").Result = FirstBit

Selection.GoTo What:=wdGoToBookmark, Name:="Text1"

ActiveDocument.Unprotect

Selection.InsertAfter SecondBit

ActiveDocument.Protect Type:=wdAllowOnlyFormFields, NoReset:=True

Else

ActiveDocument.FormFields("Text1").Result = FillText

End If

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP

"kcholly" <kcholly[ at ]hvc.rr.com> wrote in message
news:eL1McO4KGHA.1288[ at ]TK2MSFTNGP09.phx.gbl...
[Quoted Text]
>I have a form that the field I use to capture data is not large enough. I
>remember seeing a web site that explained how to set it. Ex. like a police
>report. Does anyone remember the web address.
> Thanks
>


Home | Search | Terms | Imprint | Contact
Newsgroups Reader - provided by WiredBox.Net