workbook 关闭并保存修改
workbook.close savechanges:=True
删除隐私检查
Workbook.RemovePersonalInformation = False
打印任意格式文件,只要支持windows右键打印
Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (ByVal hwnd As Long, ByVal lpszOp As String, ByVal lpszFile As String, ByVal lpszParams As String, ByVal LpszDir As String, ByVal FsShowCmd As Long) As Long
ShellExecute Application.hwnd, "print", "D:\test.pdf", "", "", SW_HIDE