Reputation: 3038
i've created a label in a 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 it never sets border to none.what's the problem?
Upvotes: 4
Views: 2283
Reputation: 3038
There is a good article about Formatting Lines of the Shapes.you can find something about line formathing there,and this is the solution of my problem.hope it's useful for some one else.
oshape.Line.Visible = MsoTriState.msoFalse;
Upvotes: 3