I was wondering if I could cumulate RunProperties on Run
Run run = new Run(new Text("test"));
RunProperties runProperties = new RunProperties();
runProperties.AppendChild<Bold>(new Bold());
runProperties.AppendChild<Underline>(new Underline());
run.AppendChild<RunProperties>(runProperties);
In this case, I only got Bold text but not Underline.
Please help
I tried your example and indeed it only did bold for me and not underline. I worked it a bit and ended up with this:
Basically, this changed:
You have to specify the type of underline you want and not just leave it up to the Underline class’s constructor. I just specified
Singleand it worked for me.