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 2005

Tip: Looking for answers? Try searching our database.

ApplyBulletDefault to selection of textfield

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Red Herring - 03 Feb 2005 14:17 GMT
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
Word Heretic - 07 Feb 2005 07:55 GMT
G'day "Red Herring" <Red Herring@discussions.microsoft.com>,

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

"Red Herring" <Red Herring@discussions.microsoft.com> reckoned:

>I have created a form for use at the office, but  protecting the document
>does not allow for field formatting.
[quoted text clipped - 30 lines]
>    DocumentRange.Select
>End Sub
 
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.