VBA-Indentlevel in 2007

E

Edward

Hi,
In PP2003 bodytext placeholder has only 5 indent levels , but in PP2007 it
has 9 indent levels ,
I use the following code to apply appropriate indent level to a specific
paragraph

ActivePresentation.Slides(4).Shapes(2).TextFrame. _
TextRange.Paragraphs(2).IndentLevel = 6

but this code only works when the indent level is less than 6.
In PP2007 if I apply an indent level of 7 and use the following code

debug.print ActivePresentation.Slides(4).Shapes(2).TextFrame. _
TextRange.Paragraphs(2).IndentLevel

it will print the correct indent level but for some reason I can't apply
indent levels higher than 5 . Any suggestions?
 
E

Edward

nevermind I found it
ActivePresentation.Slides(4).Shapes(2).TextFrame2.TextRange.Paragraphs(2).ParagraphFormat.IndentLevel = 7
 
Joined
Jan 10, 2022
Messages
2
Reaction score
0
Hi,
I see this is an old post but the problem is still there.
The property "IndentLevel" seems outdated: you can read up to 9 but write only up to 5 (Error_21471881460 (80048240)

nevermind I found it
ActivePresentation.Slides(4).Shapes(2).TextFrame2.TextRange.Paragraphs(2).ParagraphFormat.IndentLevel = 7
This does not work for me: IndentLevel is not a property of ParagraphFormat

I am searching for a workaround.
 
Joined
Jan 10, 2022
Messages
2
Reaction score
0
It does work now:
I did set the Textrange from Selection. It has to be declared as TextRange2, then ParagraphFormat has the needed IndentLevel Property.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top