Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / February 2006

Tip: Looking for answers? Try searching our database.

Long Fill in

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
kcholly - 07 Feb 2006 01:12 GMT
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
Doug Robbins - Word MVP - 07 Feb 2006 05:10 GMT
' 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

Signature

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

>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
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.