ApplyBulletDefault to selection of textfield

R

Red Herring

I have created a form for use at the office, but protecting the document
does not allow for field formatting.

So I need to created a button to either insert a bulleted list at the cursor
location, or apply a bulleted list to selected text (either or will do).

I tried creating a macro button, but all this succeeds in doing is creating
a bulleted list near the end of my document, where the button is... I assume
because the cursor location or higlighted text loses focus. Any suggestions
here.

I have several text fields, so the only option I can see currently is
putting a formatting toolbar for each form field. But there must be another
way.

Sub Selection_BulletList()
Selection_Unprotect
DocumentRange.ListFormat.ApplyBulletDefault
Selection_Protect
End Sub

Sub Selection_Unprotect()
If ActiveDocument.ProtectionType <> wdNoProtection Then
ActiveDocument.Unprotect
End If
Set DocumentRange = Selection.Range
End Sub

Sub Selection_Protect()
If ActiveDocument.ProtectionType = wdNoProtection Then
ActiveDocument.Protect Type:=wdAllowOnlyFormFields, NoReset:=True
End If
DocumentRange.Select
End Sub
 
W

Word Heretic

G'day "Red Herring" <Red (e-mail address removed)>,

you can apply pred-defined styles to locked forms. Suggest you go that
way.

Steve Hudson - Word Heretic

steve from wordheretic.com (Email replies require payment)
Without prejudice
 

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