I created a shortcut in Word Document like this
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; }
but never sets the border to none. What is the problem?
source share