Microsoft Word protects styles using VBA and the Protect Document feature

I am trying to restrict the styles that a user can use in a Word 2003 document. I do this using the Protect Document feature. For my situation, I might need to use VBA, but I'm not sure.

After I protect the document, I can no longer style just one word without changing the style for the entire paragraph.

For example, if I tried to change the word "home" to a new style in the sentence below ...

There is a house on the hill.

Then the whole sentence will become that style, and not just the word "home". Does anyone know how to get around this with VBA, or find out what I am doing wrong?

Thank!

+1


source to share


1 answer


In the Styles and Formatting area, look for styles that have an "a" next to them (instead of the paragraph mark ΒΆ). These are character styles. For example, the Emphasis style applies italics and the Strong style applies in bold. You can define other character styles for your own templates; just change the Style Dialog Box in the New Style Dialog Box from Paragraph to Character.



In the Protect Document pane, after checking the Formatting Restriction field, click the Settings link below and select the styles you want to allow. You can choose character styles as well as paragraph styles. Users can apply either some kind of style if it's a style in the list that you have allowed.

+2


source







All Articles