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.
 

Excel Facts

Test for Multiple Conditions in IF?
Use AND(test, test, test, test) or OR(test, test, test, ...) as the logical_test argument of IF.

Forum statistics

Threads
1,224,823
Messages
6,181,178
Members
453,021
Latest member
Justyna P

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top