docx
    Preparing search index...

    Function createUnderline

    • Creates underline formatting for a run in a WordprocessingML document.

      The u element specifies the style and optional color of underline formatting applied to text.

      Reference: http://officeopenxml.com/WPrun.php

      <xsd:complexType name="CT_Underline">
      <xsd:attribute name="val" type="ST_Underline" use="required"/>
      <xsd:attribute name="color" type="ST_HexColor"/>
      <xsd:attribute name="themeColor" type="ST_ThemeColor"/>
      <xsd:attribute name="themeTint" type="ST_UcharHexNumber"/>
      <xsd:attribute name="themeShade" type="ST_UcharHexNumber"/>
      </xsd:complexType>

      Parameters

      • underlineType:
            | "none"
            | "single"
            | "dotDash"
            | "dotDotDash"
            | "dotted"
            | "double"
            | "thick"
            | "wave"
            | "words"
            | "dottedHeavy"
            | "dash"
            | "dashedHeavy"
            | "dashLong"
            | "dashLongHeavy"
            | "dashDotHeavy"
            | "dashDotDotHeavy"
            | "wavyHeavy"
            | "wavyDouble" = UnderlineType.SINGLE
      • Optionalcolor: string

      Returns XmlComponent

      // Simple single underline
      createUnderline();

      // Double underline
      createUnderline(UnderlineType.DOUBLE);

      // Red wavy underline
      createUnderline(UnderlineType.WAVE, "FF0000");