PDA

View Full Version : Is it possible to restrict formatting of text in an certain area



JorgeO90
09-23-2021, 01:46 AM
Hi,

I wonder if it is possible to restrict formatting of text in an certain area in Word with VBA. I still want the ordinary formatting tools (bold, italic etc) to be functional for the other parts of the document?
Or is this a case closed so you if you restrict a document to formatting you can only choose the styles that are enabled?

BR
Jorge

gmayor
09-23-2021, 04:37 AM
If you select the areas in which you wish to allow editing, then run the following macro to add editors to the selections, you can protect the document as read only, which will allow editing only in those areas so marked.

Sub Add_Editors()
Selection.Range.Editors.Add (wdEditorEveryone)
End Sub