MS Word: Forcing user to use certain styles

Harvey

Well-known Member
Joined
Nov 18, 2004
Messages
953
Hello all. I'm back from a long time. This time my questions are not for Excel but MS Word, but since this forum has given me so many good solutions I like to give it a try. So:

I got a Word document.
It has custom styles in it (headings, font, marges etc.)
The document is converted to XML when it is finished.
Known styles that are used are converted to <para>, <subpara> etc.
Styles that are not know are not converted.
End-user may be a dummy so I do not want him to screw up my XML.
Is there any way to force him to use certain styles?
ie. user selects a certain style, then a trigger is run that takes a look if this style is allowed?

I hope I posted my question clearly and in the right forum.
Thanks for any help,

ps. anyone knowing a better place to go for this kind of questions?
 

Excel Facts

Excel Wisdom
Using a mouse in Excel is the work equivalent of wearing a lanyard when you first get to college
I think you'll find that you can build a template. In that template, only include the styles you want them to use.
Also, I think you can set the styles to only pick from the current template; not sure whether you can restrict the ability to create new styles , but you could possibly create a custom menu / toolbar with only the commands you want them to use.

All of the above would be possible in VBA if you can do it through the interface, but Word VBA is not my strong suit.

Denis
 
Upvote 0
Hi Denis,

Unfortunately there is no way to prevent a user from creating new styles, and the user can also change the font attributes. While that is not a change in style, the target document still won't look as how the user typed it. I fixed it though, with the inelegant solution of using a timer that looks through all changes and fixes them every now and then.

thanks for your help
 
Upvote 0

Forum statistics

Threads
1,225,333
Messages
6,184,325
Members
453,227
Latest member
Slainte

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top