How to detect Theme fonts in Powerpoint 2007 VBA?

Does anyone know how to detect the use of Theme fonts in Powerpoint 2007 slide objects using VBA? If one looks at Shape.TextFrame.TextRange.Font.Name the font name appears as simple name (ex: "Arial") whether or not the font was assigned as a fixed name or a Theme name (subject to change with the document theme). I don't see any other property in the Object Model that would flag the name as tied to a theme (such as ObjectThemeColor for colors).

Thanks!

-------------Problems Reply------------

There is no direct method (that I know of), however you can check with an If/Then:

Sub checkthemeFont()
Dim s As Shape
Set s = ActivePresentation.Slides(1).Shapes(1)
Dim f As Font
Set f = s.TextFrame.TextRange.Font

Dim themeFonts As themeFonts
Dim majorFont As ThemeFont

Set themeFonts = ActivePresentation.SlideMaster.Theme.ThemeFontScheme.MajorFont
Set majorFont = themeFonts(msoThemeLatin)

If f.Name = majorFont Then
Debug.Print f.Name
End If
End Sub

Category:vba Views:4 Time:2009-10-13

Related post

  • The Constantia font for Powerpoint 2013 is very different from the Constantia font in Powerpoint 2007. How can I get the 2007 version back? 2013-03-19

    The Constantia font for Powerpoint 2013 is very different from the Constantia font in Powerpoint 2007. I am in the middle of a big project but want to continue using Powerpoint 2013. Is there a way to get the Powerpoint 2007 version of Constantia on

  • Default font in Powerpoint 2007 2013-04-15

    How do I change the default font for text I am inserting. I am working with an existing file and don't want to use the existing font. --------------Solutions------------- Thanks. I found the answer to my question in the Related Topics sidebar. Check

  • PowerPoint 2007 VBA 2012-08-23

    I've written a number of routines using VBA for a powerpoint presentation. To get things to work I have to view the code and run the routines before I run the presentation. How do I get the routines to run automatically before the run the presentatio

  • Powerpoint 2007 VBA code for WAV file 2013-04-10

    I want to execute a sound file while on a slide(s) in PowerPoint. I want to push a designated key to make a certain sound if the audience gets a correct answer or another key if the answer is incorrect. VBA seems the way to go, but I'm not that educa

  • Powerpoint 2007 crashes with font embed on during save 2014-08-20

    I've tested this on multiple workstations in our office: Win7x64, WinVistax63 and WinVistax32 all running 32-bit Office Professional. In any PowerPoint file, even a new blank file, if I enable Embed fonts in Options the file will crash on save with t

  • VBA PowerPoint 2007 runtime error: ActivePresentation.SaveAs filename 2014-06-22

    Hey there, I wrote some text in PowerPoint 2007 VBA that set the filename automatically depending on a user's choice in UserForm1. The UserForm shows up once the user clicks the PowerPoint save button. In UserForm1 there is a ListBox with texts like

  • How to detect PowerPoint 2007 from a C++ addin? 2009-03-06

    I need to detect if my addin is in PowerPoint 2007 via my C++ addin. The PowerPoint object model exposes Application.Version, which should work, but I do not know enough about how to use this with IDispatch. How to detect PowerPoint 2007 from a C++ a

  • How to install the custom fonts in the computer so that you can use in PowerPoint 2007 2012-05-04

    How to install the custom fonts in the computer so that you can use in PowerPoint 2007? --------------Solutions------------- http://office.microsoft.com/en-us/powerpoint/HA102880841033.aspx Download and install a custom font on a computer running Vis

  • While spell checking in PowerPoint 2007 how do I lock a language or turn off auto detect? 2012-11-17

    While spell checking in PowerPoint 2007 how do I lock a language or turn off auto detect? --------------Solutions------------- Can you explain what you mean by "lock a language"? And it'll probably help if you can describe the problem you're experien

  • Font effects in MS PowerPoint 2007 2013-03-25

    In PowerPoint 2003 you could right click on the text and go to Font, there you had font effects, like the blinking background or marching red ants ect. Why cant I find it in PowerPoint 2007? --------------Solutions------------- You have that mixed up

  • How to set the footer font & size of Powerpoint 2007 using VBA 2013-07-23

    Hi, I want to set the font and size of footer for Powerpoint 2007 using VBA. I know how to set the text in footer using VBA, but don't know how to set font and size. Could any body help me ? The following code sets the footer text of every slides in

  • Trouble embedding a font and video in PowerPoint 2007 2013-10-15

    So: the great PowerPoint mystery. I'm not particularly tech savvy, so bear with me. I am desperate to thoroughly embed the font and video (font priority) so that a set of PowerPoints open with the correct font and video file on any computer they are

  • Create PowerPoint 2007 presentation from a template 2009-04-01

    I need to create a PowerPoint 2007 presentation from a template with Open XML Format SDK 2.0. The template has to be provided by the customer and is used for a individual layout style (font, background color or image,...). It needs to contain two pre

  • Converting PowerPoint 2007 to PowerPoint 97-2003 compatiable version 2012-03-18

    Hi there, I have converted my ppt files from version 2007 to 97-2003. But the end users on the receiving end (using ver 97-2003), cannot edit those data charts (especially the SmartObjects) and the format of those charts got haywire. In some textboxe

  • Superscript and subscript toggling in powerpoint 2007 2012-03-25

    In Powerpoint 2007 I am not able to toggle off the superscript and subscript with Ctrl+Shift+= and Ctrl+= keys though I am able to toggle them on using the keyboard shorcuts. Is there any patch or a way to fix this issue? --------------Solutions-----

  • PowerPoint 2007-Incorrect display in 1366x768 screen 2013-10-31

    PowerPoint 2007-Incorrect display in HP ProBook, Win7, 1366x768 screen resolution, LP156WHZ-TLR2. The fonts are squeezed in the middle. Is there any way to correct this? --------------Solutions------------- Normal view and Slide Show view. Before I t

  • Errant spacing appears after degree symbol in PowerPoint 2007 2012-05-29

    In PowerPoint 2007, when a degree symbol is inserted in a text box, blank spacing appears after the symbol. For example, '32°F' appears as '32° F'. Can anyone else confirm the existence of the issue? If so, please advise of a fix or workaround? Thank

  • Can't embed Sigmaplot 8.0 graph in Microsoft PowerPoint 2007 2012-07-18

    I am trying to embed Sigmaplot 8.0 graphs in Microsoft PowerPoint 2007. presentation When I try to insert the graph as a sigmaplot object in powerpoint, it says "Cannot run macro "paste to powerpoint slide". Not available in current notebooks or temp

  • Cannot open powerpoint 2007 on Windows XP 2012-08-03

    Suddenly from some day, I could not open the powerpoint 2007 on my Windows XP system. I tried with many pptx files as well as directly ran the POWERPNT.EXE under office12. None of them could work. Firstly it showed an error "PowerPoint failed to star

Copyright (C) dskims.com, All Rights Reserved.

processed in 0.147 (s). 11 q(s)