This part has no problems.Ĭurrent text in created word file will be the following: What is subscript in word code#There is a small form with a button that does described actions (see the code below). doc file, add paragraphs to it and saves it. (i as TextRange).CharacterFormat.I’m working on a program in C# that uses Microsoft Word 14.0 Object Library to create a. Step 4: Set font size of this text range as 25. Para.AppendText( “2”).CharacterFormat.SubSuperScript =. Para.AppendText( “n-1”).CharacterFormat.SubSuperScript =. Para.AppendText( “n”).CharacterFormat.SubSuperScript =. Step 3: Just like step 2, here in this step I created subscripted text in a math equation and a chemical formula. Para.AppendText( “2”).CharacterFormat.SubSuperScript = SubSuperScript.SuperScript Following code will set some texts as Superscript. For the text that you want to make it as Superscript or Subscript, just set the value of property as SuperScript or SubScript. Step 2: Append text to paragraph using AppendText() method. These lines of code create a Word document and add a blank paragraph on it. Step 1: Initialize a new instance of class, add a section, and add a paragraph. In the following section, let’s see detailed steps for inserting Superscript and Subscript with code. What is subscript in word how to#This article is talking about how to add Superscript and Subscript in Word via Free Spire.Docin C#.Īs a standalone component, free Spire.Doc enables developers/programmers to perform plenty range of operations on Word file, such as create, modify, convert and print. Subscripts and superscripts are often used in math equations, chemical formulas, or behind a phrase(such as a book name, an author name, a theory) that you want to explain more at the bottom of your page. A subscript or superscript is a number, figure, symbol, or indicator that is smaller than the normal line of type and is set slightly below or above it.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |