Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 06-27-2012, 06:49 AM
Davidoff78 Davidoff78 is offline Change Colour Theme in Word with VBA Windows XP Change Colour Theme in Word with VBA Office 2010 64bit
Novice
Change Colour Theme in Word with VBA
 
Join Date: Jun 2012
Posts: 1
Davidoff78 is on a distinguished road
Red face Change Colour Theme in Word with VBA

Dear all

Just a short question. I am relativley new to Word VBA programming and my skills are growing but still a bit limited.

I am trying to find a VBA code which exchanges the used colour theme (under the "Page Layout" tab, "Theme" group).



Reason: I have two different predefined colour themes and would like to exchange them, as my documents need to fit two different colour layouts.

The easiest way i figure is just to switch between the themes, and it would be great if I could prompt this by using a command button (set-up is no issue here).

Does this exist / is this possible with VBA?

Would be extremely grateful for any help or advice on this issue!


Best regards
David
Reply With Quote
  #2  
Old 06-28-2012, 05:23 PM
macropod's Avatar
macropod macropod is offline Change Colour Theme in Word with VBA Windows 7 64bit Change Colour Theme in Word with VBA Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,956
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Hi David,

You could use a macro like:
Code:
Sub Demo()
With ActiveDocument
  If .ActiveTheme = "Theme1" Then
    .ActiveTheme = "Theme2"
  Else
    .ActiveTheme = "Theme1"
  End If
End Sub
and attach it to a keyboard shortcut.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Change Colour Theme in Word with VBA Template is losing its theme when opend on other computer Katten03 Word 8 06-04-2012 07:04 PM
Change Colour Theme in Word with VBA Help: office 2010 lost its color theme lczlcz Office 7 03-26-2012 11:37 PM
CHange colour of footer if a cell changes to red OTPM Excel 0 05-26-2011 07:15 AM
Trying to clear the background colour from a theme ezekiel181 Word 1 11-14-2010 07:29 AM
"Change Word Options" don't change ADKREV Word 0 11-12-2010 10:56 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 06:25 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft