Reply
 
Thread Tools Display Modes
  #1   Report Post  
mikey
 
Posts: n/a
Default auto-format all form fields

I have twenty or so documents where I want all the form field font styles to
be the same. What can I do so that, when I create a form field, its font is
automatically formatted with my desired style?
  #2   Report Post  
mikey
 
Posts: n/a
Default

PS - I have a style already created, called "Form Field." I just want to know
how to get form fields to use that by default so I don't have to apply the
formatting manually to each field in all the documents.

Thanks,

mike

"mikey" wrote:

I have twenty or so documents where I want all the form field font styles to
be the same. What can I do so that, when I create a form field, its font is
automatically formatted with my desired style?

  #3   Report Post  
Jay Freedman
 
Posts: n/a
Default

Hi Mike,

Since the documents already exist, you should use the Edit Replace
dialog to apply the style to the fields. If the fields are not the
only text in the paragraphs that contain them, the style should be a
character style rather than a paragraph style.

Open one document and unprotect it. Press Alt+F9 to display field
codes. Open the Edit Replace dialog and click the More button.

In the Find What box, enter

^d FORMTEXT

In the Replace With box, enter

^&

which is the code for "the text that was found". Now click the Format
button and select Style; in the next dialog, select your Form Field
style and click OK.

Back in the Replace dialog, click the Replace All button. Close the
dialog, press Alt+F9 again to collapse the fields, protect the
document, and save. Repeat for the other documents.

If you need to do this with a macro that will process all the
documents at one go, see
http://word.mvps.org/FAQs/MacrosVBA/BatchFR.htm.

For future documents, you can automate the insert-and-format procedure
by inserting this macro in your template and replacing the text field
button on the Forms toolbar with a button that runs the macro.

Public Sub InsertTextFormField()
Dim oRg As Range

On Error Resume Next
Set oRg = Selection.Range
ActiveDocument.FormFields.Add Range:=oRg, _
Type:=wdFieldFormTextInput
oRg.MoveEnd unit:=wdWord, Count:=1
oRg.Style = ActiveDocument.Styles("Form Field")
Set oRg = Nothing
End Sub

--
Regards,
Jay Freedman
Microsoft Word MVP FAQ: http://word.mvps.org

On Sun, 10 Apr 2005 19:29:01 -0700, "mikey"
wrote:

PS - I have a style already created, called "Form Field." I just want to know
how to get form fields to use that by default so I don't have to apply the
formatting manually to each field in all the documents.

Thanks,

mike

"mikey" wrote:

I have twenty or so documents where I want all the form field font styles to
be the same. What can I do so that, when I create a form field, its font is
automatically formatted with my desired style?


Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Using form text fields included in an IF Statement with autotext Steve Microsoft Word Help 7 April 8th 05 08:17 AM
Having multiple form fields automatically updated jrwaguespack Microsoft Word Help 3 March 25th 05 07:43 AM
Form fields in frames - can I format the text (ie bold, italic)? La La Lara Microsoft Word Help 3 January 28th 05 03:09 PM
Email a protected document that contains Text Form Fields Dowza New Users 1 January 8th 05 10:31 AM
Controlling order of accessing form fields in a WORD form Tom Tables 1 January 6th 05 06:32 PM


All times are GMT +1. The time now is 06:08 AM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"