Of course, if users choose not to allow macros, there isn't much you can do.
--
Stefan Blom
Microsoft Word MVP
---------------------------------------------
"Stefan Blom" wrote in message
To hide styles you'd need code such as the following:
ActiveDocument.Styles("Heading 1") _
..Visibility = True 'yes, the property should be true
Note that the Visibility property should be set to True when you want to
hide (!) the style.
This is exemplified in an article that deals with table styles (not
supported in Word 2003, if I remember correctly), but the principle is the
same for all styles. See
http://www.shaunakelly.com/word/styles/how-to-hide-table-styles-in-word.html.
To force these settings on each user you would have to open their Normal
template as a document, run the macro, save Normal and close.
--
Stefan Blom
Microsoft Word MVP
---------------------------------------------
"Jedumi" wrote in message
For clarity:
We can 'Show' only specified styles on all future documents on our own
machines - simply by following the standard steps to save in Normal.dot
(as Stefan mentions).
What we're trying to do is create code that will amend the Normal.dot on
the machine of someone else (who is not computer savvy) to - by default
- show specific styles only in their new documents. (We could send them
a self-extracting utility to place their Normal.dot with a custom
Normal.dot in the required directory, but we don't want to do this in
case it wipes away anything they may have themselves saved in
Normal.dot.)
("not computer savvy" meaning: they can't even follow instructions to
select to show specified styles only; but we also mean that we'd like to
automate it for their convenience - especially as we're talking about
selecting at least a dozen specific styles and making sure that only
these are visible.)
Recording the process doesn't provide any useful statements.
In any case, the above will always show 'Custom', whereas we want it to
show 'Available Styles'.
Here's something from another forum:
Thanks for the info, but the solutions only work for the Custom view!
Seems there is a VBA bug or even a main Word bug.
See the site:
http://www.tek-tips.com/viewthread.cfm?qid=1212007
Where the bottom line seems to be:
******************
There IS the following:
wdShowFilterStylesAvailable
it is part of the wdShowFilter class. Others are:
wdShowFilterFormattingAvailable
wdShowFilterStylesInUse
So they are there. There must be a way to do something with them.
... I am trying hard to make VBA DO something with it. So far, no luck.
I can get a Variant to
be[\b] wdShowFilterStylesAvailable. Great.
That's nice. I still have not found a method or a property that will
accept it.
There is Document.FormattingShowFilter but I can't make it do anything
at the moment.
As far as I can tell the Document filter properties don't appear to work
- it wouldn't be the first time!