How to set left margin in PowerPoint text box using VSTO

I take some user data and add it to my PowerPoint presentation using VSTO. To get the formatting to look right, although I need to be able to set the left margin of some text in the text box. There will be an initial block of text followed by another indented block. For example (underline added to underline interval):

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed vestibulum elementum neque id rhoncus. In fermentum eros nec dolor lobortis sit amet fermentum est ensat. Curabitur eleifend nunc eu odio carula ut elementum erat aliquam. Utah adipiscing ipsum sit amet leo pulvinar hendrerit. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Nulla non neque in velit lacinia tempor et a Lacus.
___________Cras auctor bibendum urna, varnishing Facilisis lacinia non.
___________ Nullam in quam a mauris, hence the vulgar sed eu Sapien.
___________Fusce sed urna nulla, ut sagittis lacus. Pellentesque tortor
___________augue, scelerisque at aliquet a, pretium ac Ipsum.

I can get this effect by setting Shape.TextFrame.TextRange.IndentLevel = 2 to the bottom block of text. However, I cannot figure out how to programmatically set the value of a field. Does anyone know how to do this?

+4
source share
1 answer

This is taken care of through Shape.TextFrame.MarginRight and Shape.TextFrame.MarginLeft , etc.

+3
source

All Articles