我在 MS Publisher 中有一个 1000 页的文档。
我必须调整每个 TextFrame 的大小。每页大约有四个。
我的宏看起来像这样:
Sub Resize_Textbox()
Dim pubPage As Page
Dim pubShape As Shape
For Each pubPage In ActiveDocument.Pages
For Each pubShape In pubPage.Shapes
If pubShape.Type = pbTextFrame Then
pubShape.TextFrame.Height = "21.5 cm"
If pubShape.TextFrame.Width = "18 cm" Then
pubShape.TextFrame.Width = "12.6 cm"
End If
If pubShape.TextFrame.Width = "8.75 cm" Then
pubShape.TextFrame.Width = "6.3 cm"
End If
End If
Next pubShape
Next pubPage
End Sub
我检查了宏安全并启用了所有宏。我保存了一切。
它给了我一个错误,我想更改文本框的高度。