返回介绍

LineWidth 属性

发布于 2019-09-29 10:12:00 字数 1524 浏览 1637 评论 0 收藏 0

全部显示

返回或设置对象边框的线宽。如果对象中没有边框,则返回 WdLineWidth 常量;如果对象中包括一种以上的线宽,则返回 wdUndefined 常量。可读写。

WdLineWidth 可以是下列 WdLineWidth 常量之一:
wdLineWidth025pt
wdLineWidth050pt
wdLineWidth075pt
wdLineWidth100pt
wdLineWidth150pt
wdLineWidth225pt
wdLineWidth300pt
wdLineWidth450pt
wdLineWidth600pt

expression.LineWidth

expression 必需。该表达式返回一个 Border 对象。

说明

如果指定的线宽对边框线型无效,则此属性将产生一个错误。若要确定对特定线型有效的线宽,请参阅“格式”菜单中的“边框和底纹”对话框。

示例

本示例为活动文档的第一个表格的第一行添加底边边框。

If ActiveDocument.Tables.Count >= 1 Then
 With ActiveDocument.Tables(1).Rows(1).Borders(wdBorderBottom)
 .LineStyle = wdLineStyleSingle
 .LineWidth = wdLineWidth050pt
 End With
End If

本示例为所选内容的左边添加红色波浪线边框。

With Selection.Borders(wdBorderLeft)
 .LineStyle = wdLineStyleSingleWavy
 .LineWidth = wdLineWidth075pt
 .ColorIndex = wdRed
End With

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
    我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
    原文