The macro is executed when a document is opened. If the macro is not executed because you open a file with double-click, then you have to change the vba option.The macro must be inserted under GlobalMacros > ThisMacroStorage [image1].
1 2 3 4 5 6 7 8 9
Public Sub GlobalMacroStorage_DocumentOpen(ByVal Doc As Document, ByVal FileName As String) Doc.ActiveWindow.ActiveView.ToFitAllObjects With Doc.MasterPage .Color.RGBAssign 165, 175, 175 End With Exit Sub End Sub
i created a new file.... page background not changed sir
besides fit to window is applying