I have looked at a number of forum posts, and I have tried the following code.
ncShapes = documentWord.GetChildNodes(NodeType.Shape, True) For Each shapeNode As Shape In ncShapes shapeNode.HorizontalAlignment = HorizontalAlignment.Center shapeNode.ParentParagraph.ParagraphFormat.Alignment = ParagraphAlignment.Center Next
But the Html element that results for the TextBox is never centered. It always ends up with some other alignment specification that seems to depend on the Wrapping Style of the TextBox in the original Word document. In some cases it creates the element with a float: left; alignment, in other cases a position: absolute; zorder: 0; alignment, and so on, but never centered.
How do you center a TextBox in the output Html? We are using version 22.214.171.124 (v2.0.50727). Thanks.