0
有没有一种简单的方法可以改变MS Publisher中大量文本框的位置(水平和垂直)?我可以在哪里找到解释宏编程的所有方法?如何在MS Publisher中的VBA中移动一堆文本框?
有没有一种简单的方法可以改变MS Publisher中大量文本框的位置(水平和垂直)?我可以在哪里找到解释宏编程的所有方法?如何在MS Publisher中的VBA中移动一堆文本框?
发布商对象模型可在此处获得: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