Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Distributing Themes?

16 views
Skip to first unread message

Dstars

unread,
Jan 30, 2010, 3:56:04 PM1/30/10
to
I've created a set of templates in Word 2007 that I want to distribute to all
the employees at the company that I work for. I assumed that the colour- and
font-theme that I created would be saved together with the template, but
apparently that's not the way it works.

I realize that it's possible to save the theme separately, and then instruct
everyone to download said theme to their own Document Themes folder, but I'm
wondering if that's the way you're supposed to do this, or is there an easier
way? Ideally I would like to set this theme as the default whenever someone
opens my templates.

TIA

Jay Freedman

unread,
Jan 30, 2010, 5:38:07 PM1/30/10
to
As far as I've been able to determine, this is indeed the way you're
supposed to distribute themes -- they are not stored in templates.

You can set your theme as the default for your template by including
this macro in your template (see
http://www.gmayor.com/installing_macro.htm if needed), modifying the
file name as needed:
Sub AutoOpen()
Dim ThemePath As String
Dim ThemeFile As String

ThemeFile = "MyTheme.thmx"
ThemePath = Options.DefaultFilePath( _
wdUserTemplatesPath) & _
"\Document Themes\"

On Error Resume Next
ActiveDocument.ApplyDocumentTheme _
ThemePath & ThemePath
If Err <> 0 Then
MsgBox ThemeFile & " was not found in" & _
vbCr & ThemePath
End If
End Sub

--
Regards,
Jay Freedman
Microsoft Word MVP FAQ: http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the
newsgroup so all may benefit.

Dstarss

unread,
Feb 2, 2010, 10:07:05 AM2/2/10
to
Thanks so much for the the help. This works great in Word, and I thought it would be the same for Powerpoint, but every time I try to run this in Powerpoint I get a Run-time error '424': Object required. Am I missing something or doesn't the macros work the same in Word/PowerPoint etc.

---
frmsrcurl: http://msgroups.net/microsoft.public.word.docmanagement/Distributing-Themes

Jay Freedman

unread,
Feb 2, 2010, 12:01:45 PM2/2/10
to

The macro in my previous post is specific to Word, because it contains
references to things that exist only in Word VBA, such as
Options.DefaultFilePath and ActiveDocument. (And it contains a typographical
error; the line "ThemePath & ThemePath" should be changed to "ThemePath &
ThemeFile".)

The equivalent macro for PowerPoint is this:

Sub AutoOpen()
Dim ThemePath As String
Dim ThemeFile As String

ThemeFile = "MyTheme.thmx"
ThemePath = Environ("appdata") & _
"\Microsoft\Templates\Document Themes\"

On Error Resume Next
ActivePresentation.ApplyTheme _
ThemePath & ThemeFile

Dstarss

unread,
Feb 2, 2010, 2:53:25 PM2/2/10
to
Once again, thank you. I fixed the syntax error but forgot to mention it before. Sorry to bother you again, but is there a similar variable that allows you to change just the theme font/colour/effect, something like ActivePresentation.ApplyFont ?


---
frmsrcurl: http://msgroups.net/microsoft.public.word.docmanagement/Distributing-Themes

Jay Freedman

unread,
Feb 2, 2010, 11:28:37 PM2/2/10
to
On Tue, 02 Feb 2010 11:53:25 -0800, Dstarss <us...@msgroups.net/>
wrote:

>Once again, thank you. I fixed the syntax error but forgot to mention it before. Sorry to bother you again, but is there a similar variable that allows you to change just the theme font/colour/effect, something like ActivePresentation.ApplyFont ?
>
>
>---
>frmsrcurl: http://msgroups.net/microsoft.public.word.docmanagement/Distributing-Themes

I really don't know that much about VBA in PowerPoint, but a quick
scroll through the VBA Help didn't turn up anything that looked like
that. I suggest you ask this question in a PowerPoint group.

JeanM1970

unread,
Feb 10, 2010, 6:43:42 PM2/10/10
to

I confess I know no VBA, have never created a macro....
But I followed your instructions, (I'm in the exact same situation as
Tia) and then when I took a copy of my PPT macro-enabled template to
another machine, the theme doesn't show up. When I run the macro on the
new machine, I get an error message:

NewColor.thmx was not found in
C:\Documents and Settings\Administrator...etc.

I've obviously not copied the .thmx file over, but isn't that the point
of this macro? Or am I missing something? I don't want to have to make
my co-workers copy the .thmx file to each of their hard drives into the
exact correct location....

I'm on 2007 btw.

thank you for your help.

Jean


Jay Freedman;631645 Wrote:
> On Tue, 02 Feb 2010 11:53:25 -0800, Dstarss <us...@msgroups.net/>
> wrote:
>
> >Once again, thank you. I fixed the syntax error but forgot to mention
> it before. Sorry to bother you again, but is there a similar variable
> that allows you to change just the theme font/colour/effect, something
> like ActivePresentation.ApplyFont ?
> >
> >
> >---

> >frmsrcurl: 'Distributing Themes? - microsoft.public.word.docmanagement
> | Microsoft Newsgroups' (http://tinyurl.com/yebqqdu)


>
> I really don't know that much about VBA in PowerPoint, but a quick
> scroll through the VBA Help didn't turn up anything that looked like
> that. I suggest you ask this question in a PowerPoint group.
>
> --
> Regards,
> Jay Freedman

> Microsoft Word MVP FAQ: 'Home' (http://word.mvps.org)


> Email cannot be acknowledged; please post all follow-ups to the
> newsgroup so all may benefit.


--
JeanM1970
------------------------------------------------------------------------
JeanM1970's Profile: 1477
View this thread: http://www.thecodecage.com/forumz/showthread.php?t=174915

[url=&quot;http://www.thecodecage.com&quot;]Microsoft Office Help[/url]

Jay Freedman

unread,
Feb 10, 2010, 7:02:02 PM2/10/10
to

>I've obviously not copied the .thmx file over, but isn't that the point
>of this macro? Or am I missing something? I don't want to have to make
>my co-workers copy the .thmx file to each of their hard drives into the
>exact correct location....

No, the point of the macro I posted was to load an existing theme file
into the current document, as requested by the original poster in the
thread. It was *not* to create the theme formatting when the .thmx
file doesn't exist.

It should be possible to write a different macro that creates the
desired formatting and saves it as a .thmx file. But, as I said
before, PowerPoint macro programming isn't my area, so it would be
better to ask in a PPT forum.

Robert M. Franz [RMF]

unread,
Feb 26, 2010, 11:42:48 AM2/26/10
to
Hello Dstars

Themes are a great new feature for all-purpose templates/documents. To
use themes effectively, you need theme-ready templates.

But when you go through the trouble of creating a company template, you
normally want to adhere to a pre-specified set of fonts, sizes, etc.
(part of a CI/CD). I'm not sure if you want to create theme-ready
templates in the first place, then, and risk letting your folks (more
easily) create colorful business reports in fancy fonts ...


Robert
--
/"\ ASCII Ribbon Campaign | MSFT |
\ / | MVP | Scientific Reports
X Against HTML | for | with Word?
/ \ in e-mail & news | Word | http://www.masteringword.eu/

0 new messages