Issue to code

Peter_1985 2,486 Reputation points
2021-10-16T10:03:40.157+00:00

Hi,
It is not having "Underline" effect to the words below. What to adjust?

            RunProperties runProperties2 = run.AppendChild(new RunProperties(new RunFonts { Ascii = "Times New Roman" }));
            RunProperties runProperties3 = run.AppendChild(new RunProperties(new FontSize { Val = new StringValue("24") }));
            RunProperties runProperties = run.AppendChild(new RunProperties(new Underline()));
            run.AppendChild(new Text("Personal Details"));
C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
10,235 questions
Office Development
Office Development
Office: A suite of Microsoft productivity software that supports common business tasks, including word processing, email, presentations, and data management and analysis.Development: The process of researching, productizing, and refining new or existing technologies.
3,480 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Viorel 112.1K Reputation points
    2021-10-16T10:20:09.647+00:00

    Try this adjustment:

    run.AppendChild( new RunProperties( new RunFonts { Ascii = "Times New Roman" }, 
                                        new FontSize { Val = new StringValue("24") }, 
                                        new Underline( ) ));
    run.AppendChild( new Text("Personal Details"));