打印 Word (2010) 文档时出现臭名昭著的错误
可打印区域外的边距
我发现您可以使用以下宏来抑制此警告:
Public WithEvents App As Word.Application
Private Sub App_DocumentBeforePrint(ByVal Doc As Document, Cancel As Boolean)
Dim bPrintBackgroud As Boolean
'Save current setting of background printing
bPrintBackgroud = Options.PrintBackground
Options.PrintBackground = False
'Turn off DisplayAlerts
Application.DisplayAlerts = wdAlertsNone
Dialogs(wdDialogFilePrint).Show
'Turn on DisplayAlerts again
Application.DisplayAlerts = wdAlertsAll
'Set original background printing setting
Options.PrintBackground = bPrintBackgroud
End Sub
这可行,但在打印作业完成后,我仍然会收到边距错误。所以脚本并没有真正抑制警告,它只是延迟它。任何人都可以指出我永久禁用此警告的正确方向吗?