154965 发表于 2018-5-22 14:54:53

求指点cdr宏修改对象长度的语句或将高度值设为缺省值的语句

录制的cdr宏,目的是将选择的对象宽度改为250mm,录制出的宏却是宽度与高度一起修改,高度修改为0时是等比例变化,缺省值的写法我不知道,恳请论坛的前辈们能给予指点。
附上录制的语句
Sub L250()
    ' Recorded 2018/5/22
    ActiveDocument.Unit = cdrMillimeter
    Dim OrigSelection As ShapeRange
    Set OrigSelection = ActiveSelectionRange
    ActiveDocument.ReferencePoint = cdrMiddleLeft
    OrigSelection.SetSize 250, 0
End Sub

qjinyang 发表于 2018-5-24 19:59:52

本帖最后由 qjinyang 于 2018-5-24 20:02 编辑

    ActiveDocument.Unit = cdrMillimeter
    Dim OrigSelection As ShapeRange
    Set OrigSelection = ActiveSelectionRange
    ActiveDocument.ReferencePoint = cdrMiddleLeft
    OrigSelection.SizeWidth = 250
最改了最后一条

154965 发表于 2018-5-26 19:10:26

qjinyang 发表于 2018-5-24 19:59
ActiveDocument.Unit = cdrMillimeter
    Dim OrigSelection As ShapeRange
    Set OrigSelection...

谢谢!这对我帮助很大,非常感谢!

小迷猪 发表于 2018-6-16 10:01:09

哇塞好高级,求学习{:1_124:}
页: [1]
查看完整版本: 求指点cdr宏修改对象长度的语句或将高度值设为缺省值的语句