我在这样的 Word 文档中创建了一个标签
public void CreateLabel(string LabelName, int left, int top, int width, int height, string text)
{
var oRange = currentDoc.Bookmarks.get_Item("\\endofdoc").Range;
var oshape = oRange.Document.Shapes.AddLabel(MsoTextOrientation.msoTextOrientationHorizontal, left, top, width, height);
oshape.Name = LabelName;
oshape.TextFrame.ContainingRange.Borders.OutsideLineStyle=WdLineStyle.wdLineStyleNone;
oshape.TextFrame.ContainingRange.Text = text;
oshape.TextFrame.ContainingRange.Font.Size = 14;
}
但它永远不会将边框设置为无。有什么问题?