How to display superscript and subscript in ppt?

Technical support for Presentation

Moderator: iceblue support

How to display superscript and subscript in ppt?

Postby stp_webdev » Mon May 22, 2017 10:37 am

I want to add a superscript and subscript, so how to add the same.
stp_webdev
 
Posts: 15
Joined: Fri Apr 21, 2017 1:40 pm

Re: How to display superscript and subscript in ppt?

Postby Betsy.jiang » Tue May 23, 2017 3:49 am

Dear stp_webdev,

Thanks for your inquiry.
Here is sample code for your kind reference.
Code: Select all
            TextRange tr = new TextRange("superscript");
            shape.TextFrame.Paragraphs[0].TextRanges.Append(tr);
            //superscript
            shape.TextFrame.Paragraphs[0].TextRanges[1].Format.ScriptDistance = 30;
            shape.TextFrame.Paragraphs[0].TextRanges[1].Fill.FillType = FillFormatType.Solid;
            shape.TextFrame.Paragraphs[0].TextRanges[1].Fill.SolidColor.Color = Color.Black;
            //shape.TextFrame.Paragraphs[0].TextRanges[5].Format.ScriptDistance = -25; Subscript

If there is any question, please let me know.

Sincerely,
Betsy
E-iceblue support team
User avatar
Betsy.jiang
 
Posts: 1628
Joined: Tue Sep 06, 2016 8:30 am


Return to Spire.Presentation

Who is online

Users browsing this forum: No registered users and 0 guests

cron