用VB如何在word中画出一个矩形啊?
如题 求救 谢谢
[解决办法]
你可以参考word中的vba代码:
Sub InsertShape() ActiveDocument.Shapes.AddShape(msoShapeRectangle, 98.25, 215.25,72#,72#).Select '添加,并选中 '以下为处理 Selection.ShapeRange.ScaleWidth 1.6, msoFalse, msoScaleFromTopLeft Selection.ShapeRange.ScaleHeight 1.11, msoFalse, msoScaleFromBottomRight Selection.ShapeRange.Fill.ForeColor.ObjectThemeColor = wdThemeColorAccent6 Selection.ShapeRange.Fill.ForeColor.TintAndShade = 0.6 Selection.ShapeRange.Fill.Visible = msoTrueEnd Sub
[解决办法]
ActiveDocument.Shapes.AddShape