开发者

Grouping AutoShape in Word Document using Interop.Word

开发者 https://www.devze.com 2023-03-29 16:46 出处:网络
I\'ve tried to draw AutoShape in Word using Interop.Word 12.0 in C# language. I\'ve some AutoShape object in the document. How to group that AutoShapes using that Interop.Word 12.0?

I've tried to draw AutoShape in Word using Interop.Word 12.0 in C# language. I've some AutoShape object in the document. How to group that AutoShapes using that Interop.Word 12.0?

There is a way grouping AutoShape object using VBA b开发者_运维百科ut there is one method that doesn't exist now (document.Shapes.get_Range(...)).


 ActiveDocument.Shapes.AddShape(msoShapeRectangle, 80.25, 478.5, 39#, _
        61.5).Select
    ActiveDocument.Shapes.AddShape(msoShapeOval, 131.25, 487.5, 71.25, 48.75) _
        .Select
    ActiveDocument.Shapes.Range(Array("Oval 9", "Rectangle 8")).Select
    Selection.ShapeRange.Group.Select

Read above macro

0

精彩评论

暂无评论...
验证码 换一张
取 消