how to get current theme of Word 2007

A

Anita

hi,

i want to know the current theme of Word 2007. (whether it is blue, black,
or silver)

I am using following in C#:

applicationObject.ActiveDocument.ActiveThemeDisplayName
applicationObject.ActiveDocument.ActiveTheme

However, i get "none" as a result, always for both statements.

does anyone know how to get the same ?

Thanks,
~Anita
 
T

Tony Jollans

Prepare to be confused .. and probably dissatisfied.

ActiveTheme is a pre-2007 Theme, which does still exist and can be used for
e-mail but is really no longer normally relevant. "none" is probably telling
you the truth.

DocumentTheme is a 2007 Theme, but the reference provided in the OM does not
include its name. Its name *could* be extracted from the xml but is not
provided directly.

The Blue/Silver/Black option is called a Color Scheme but is not related in
any way to the Color Scheme that belongs to the Document Theme. It is not
made available via the object model, and I don't think it's possible to get
hold of it at all.
 
A

Anita

hi all,

can we get this current theme information from registry. i guess..
we should be able to... as Word also needs this infomation at start-up.

one more observation. this theme change in one application, results a
change in all applications. (e.g. change of theme in Word 2007 results change
of theme in Outlook 2007 as well.)

~Anita
 
T

Tony Jollans

From a quick look it seems as if you can.

HKCU\Software\Microsoft\Office\12.0\Common\Theme

is a double word, values 1 (=Blue), 2 (=Silver), 3 (=Black). If it's not
present, or not valid, the default Blue is used. Again from a quick look it
appears that there are no overriding policies or other settings.
 
A

Anita

hey Tony,

Thanks a lot :). It works .

~Anita

Tony Jollans said:
From a quick look it seems as if you can.

HKCU\Software\Microsoft\Office\12.0\Common\Theme

is a double word, values 1 (=Blue), 2 (=Silver), 3 (=Black). If it's not
present, or not valid, the default Blue is used. Again from a quick look it
appears that there are no overriding policies or other settings.
 
A

Anita

hi,

How can we get the notification of the change that some particular
registry value has changed...?

for e.g. I would want to be notified in C# code whenever the value of this
key changes...

Any pointers on this would in help.

~Anita
 
T

Tony Jollans

I don't think that's possible. What you have to do is query it whenever you
need the value so that you always use the latest value.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top