PDA

View Full Version : Documenting Word Options



mattreade
03-08-2011, 03:01 PM
Is there a way to write a Word 2010 macro that will list the current settings of all the Word Options without having to list them manually?

I noticed that application.options does not offer a .count, .item or .name method.

What I am trying to do is document a user’s settings and maybe reset them if a user tries to change a lot of things and then becomes unhappy with those changes.

In the past I used "MouseTrax Word Option Utility" which was great with 2003 and earlier. Greg Chapman went to a great deal of trouble to copy the name of each option into a macro so they could be checked one at a time. Then wrote a macro to place each item in a table with a description.

I was hoping there was a way to programmatically walk through all the options and collect the current setting.

In the long run I would like to be able to set ALL Word options and settings to a company standard whenever I setup a new computer.

Would walking through the dialogs be a way to start?
Any ideas that would give me a starting point would be great.

Matt

Frosty
03-08-2011, 03:15 PM
Big question. I haven't found this code yet (although I haven't really been looking), but someone else may have a better answer. I hate developing this kind of stuff, because I always figure some has already done it somewhere, as it's such a basic type thing. So I feel your pain on this issue.

Two things I would suggest just as an approach (and I'm brainstorming with you here, rather than giving you something I already know).

1. Look in the help file (or on msdn) for the Options Object, and you should be able to get selectable text of all the members. From there you can certainly construct a With/EndWith block with some judicious use of find/replace, converting to a table, deleting columns, etc.

However, not all user settings will be under the options object... so at the end of the day, you're probably going to have to record some macros and see what the objects are. A quick test in 2010 showed me that, unlike earlier versions, the recorded macro doesn't actually do all the settings when I only change one. That stinks.

2. Look up the office configuration tool... there are ways of getting standard "settings" configured into your image, which may be a better starting off point, and then you figure out the ones which matter to you and your company.

If you would, please report back what you learn about this, as other people would benefit from this as well, I'm sure.

Thanks!
- Jason

mattreade
03-08-2011, 04:07 PM
Jason, I will look into those two points.
Yes, I will be looking for the rest of the "settings" that are not in the options sections.
I'll let you know what I find.
Matt