2,503
社区成员




自己做的一个宏,却一个功能就是打开文件即加载宏,网上的一段宏程序如下,但是实现不了
Private Sub GlobalMacroStorage_DocumentOpen(ByVal Doc As Document, ByVal FileName As String)
Const width = 297
Const height = 420
Doc.Unit = cdrMillimeter
Doc.ActivePage.SetSize width, height
Dim sh As Shape
'Dim filePath As String
Dim name As String
Set sh = Doc.ActivePage.SelectShapesFromRectangle(-10000, -10000, 10000, 10000, True)
sh.CenterX = width / 2
sh.CenterY = height / 2
Doc.Save
Doc.PrintOut
End Sub