Fill-in forms

G

Guest

I need to allow the use of subscripts and superscripts in a Word fill-in
form. These would be in a field where a researcher submits and abstract that
contains super- or subscripts.

Thank you
 
C

Cindy M -WordMVP-

Hi =?Utf-8?B?TWFyeSBBbm4gS3J1cHBlcg==?=,
I need to allow the use of subscripts and superscripts in a Word fill-in
form. These would be in a field where a researcher submits and abstract that
contains super- or subscripts.
this requires a macro that unprotects, applies the formatting, then reprotects
the document. Here's some sample code you can assign to a couple of toolbar
buttons. Note, however, that this won't work if the form fields are in a table
because the user can't select single characters in a form field in a table cell.

Sub FormFieldFormat()
Dim doc As Word.Document
Dim rng As Word.Range
Dim format As String

Set doc = ActiveDocument
Set rng = Selection.Range
format = CommandBars.ActionControl.Caption
If doc.ProtectionType <> wdNoProtection Then doc.Unprotect
Select Case format
Case "SuperScript"
rng.Font.SuperScript = wdToggle
Case "SubScript"
rng.Font.SubScript = wdToggle
Case Else
End Select
doc.Protect wdAllowOnlyFormFields, True
rng.Select
rng.Collapse wdCollapseEnd
End Sub

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 8 2004)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question or reply
in the newsgroup and not by e-mail :)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top