How to underline text RRS feed

  • Question

  • Hi,

    I tried to underline text wit OpenXml, so I searched for ideas and I found this:

    Now we can implement the simple properties like text, bold, italic and underline.
    public Boolean Underline {
            get { return RprGetElement("w:u") != null; }
            set { if (value) RprReplaceElement("w:u"); else
            RprRemoveElement("w:u");} }

    So, it seems, <w:u/> should do the formatting (like <w:b/> or <w:i/> does it), but it doesn't work. I used this:

    Code Block

              <w:t xml:space="preserve">Lorem ipsum dolor sit amet, consectetuer adipiscing felis et imperdiet euismod, purus ipsum pretium metus, in lacinia </w:t>

    Any idea, how to do it?
    Sunday, December 9, 2007 1:38 PM


  • Well, it seems I can put the "Solved by myself" stamp on this thread, too.

    The underline tag requires the value attribute to be set to "single".
    Tuesday, December 11, 2007 4:58 PM