View Full Version : How to Locate VBA Elements
nullpointer
07-29-2016, 08:19 AM
I'm new to VBA and my question is:
I've dug around through Google and can't seem to locate an answer.
Is there a way to identify, in PowerPoint, which text effects (WordArt) are what?
Example: I have a line of code in VBA
.WordArtFormat = msoTextEffect1
What I'm after is no text effect at all and it appears all the text effects have numbers. Where do those numbers come from and is there a way in PowerPoint to identify what a text effects number is?
Thanks
John Wilson
07-31-2016, 06:38 AM
This should print you a slide with all the preset styles.
Sub chex()Dim osld As Slide
Dim L As Long
Dim M As Long
Set osld = ActiveWindow.Selection.SlideRange(1)
For M = 1 To 10
For L = 1 To 5
With osld.Shapes.AddLabel(msoTextOrientationHorizontal, L * 125, M * 35, 30, 50)
.TextFrame2.WordArtFormat = ((M - 1) * 5 + L) - 1
With .TextFrame2.TextRange
.Text = "WA " & CStr(((M - 1) * 5 + L))
.Font.Size = 30
End With
End With
Next L
Next M
End Sub
We will need to see a lot more of your code than that. Especially since that is what you don't want.
What I'm after is no text effect at all
WordArt is text effects, you can't have one without the other.
John Wilson
08-01-2016, 06:08 AM
Word Art and Text are really the same thing in versions after 2007. The wordart formats are just presets
You can access the features like line, shadow, reflection etc for normal text
Sub chex()
Dim otr2 As TextRange2
' text must be selected
Set otr2 = ActiveWindow.Selection.TextRange2
With otr2.Font
.Fill.ForeColor.RGB = RGB(12, 12, 12)
.Size = 36
.Bold = True
.Line.Visible = True
.Line.Weight = 1
.Line.ForeColor.RGB = RGB(255, 0, 0)
.Line.Style = msoLineSingle
End With
End Sub
nullpointer
08-01-2016, 08:39 AM
Wow - Thank You!
Powered by vBulletin® Version 4.2.5 Copyright © 2025 vBulletin Solutions Inc. All rights reserved.