Adding Heading, Subheading, adjusting font size and style to Automated Power point Presentation in VBA

Tev123

New Member
Joined
Jul 9, 2019
Messages
3
Hi,

I am in the process of automating a monthly report using VBA (Power Point Presentation).
I can not seem to add a sub heading to my current code. Thus far, I am able to add create the power point presentation (not shown entirely) and I have a heading (Shown Below). But I can not add a sub heading just below my current heading, change the font size and lastly font style.

Please see the current code (Short snippet of the entire code) I have:


Dim myPresentation As Object
Dim mySlide As Object
Dim PowerPointApp As Object
Dim shp As Object
Dim MySlideArray As Variant



'----- 1 -----
Set mySlide = myPresentation.Slides.Add(1, 11) '11 = ppLayoutTitleOnly
mySlide.Shapes(1).TextFrame.TextRange.Text = "Heading Title Displayed Thus Far"
mySlide.Shapes(1).TextFrame.TextRange.Paragraphs.ParagraphFormat.Alignment = msoAlignLeft
mySlide.Shapes(1).TextFrame.TextRange.Font.Color.RGB = RGB(0, 174, 239)
mySlide.Shapes(1).Left = 2.92 * 28.34646
mySlide.Shapes(1).Top = 0.71 * 28.34646

Thank you.
 

Some videos you may like

Excel Facts

Excel Joke
Why can't spreadsheets drive cars? They crash too often!

Watch MrExcel Video

Forum statistics

Threads
1,102,302
Messages
5,486,054
Members
407,529
Latest member
netojose

This Week's Hot Topics

Top