PDA

View Full Version : [SOLVED:] how to get the number of levels in SlideMaster correctly



chronjy
02-03-2023, 04:04 AM
(PowerPoint 2019)
There are 9 levels in SlideMaster but the code below print only just 5.
what is the problem?

ActivePresentation.Designs(1).SlideMaster.TextStyles(ppDefaultStyle).Levels .Count

John Wilson
02-03-2023, 05:20 AM
In modern versions (later than 2003) just count the paragraphs in the text placeholder (normally shape 2)
ActivePresentation.designs(1).SlideMaster.Shapes(2).TextFrame2.TextRange.Pa ragraphs.Count

chronjy
02-03-2023, 05:52 AM
Thank you so much for your perfect reply