2016-05-31 71 views

回答

0

发布商对象模型可在此处获得:https://msdn.microsoft.com/en-us/library/office/ff939040.aspx

约VBA编辑器信息(其工作在Publisher一样在Word或Excel),可以在这里:https://support.office.com/en-us/article/Find-Help-on-using-the-Visual-Basic-Editor-61404b99-84af-4aa3-b1ca-465bc4f45432

这将所有选定的形状向下2厘米和3cm向右:

Option Explicit 

Sub MoveTextFrames() 
    Dim oShapes As ShapeRange 
    Dim oShape As Shape 
    Dim moveRight As Long 
    Dim moveDown As Long 

    moveRight = 3 
    moveDown = 2 

    Set oShapes = Selection.ShapeRange 

    For Each oShape In oShapes 
     oShape.Left = oShape.Left + CentimetersToPoints(moveRight) 
     oShape.Top = oShape.Top + CentimetersToPoints(moveDown) 
    Next oShape 

End Sub 

只要编辑这些行,如果你想要一些其他的值:

moveRight = 3 
    moveDown = 2 
相关问题