【文件属性】:
文件名称:excel 打开后自动定时打印
文件大小:36KB
文件格式:XLS
更新时间:2015-03-01 03:24:02
excel 定时 自动打印
excel打开后 定时 自动打印
Sub auto_open() '设置一个自动运行的宏——auto_open
Application.OnTime TimeValue("08:30:00"), "tx" '设置提醒时间——08:30:00(可以根据需要修改),设置调用提醒宏——tx。
Application.OnTime TimeValue("08:52:00"), "tx" '再设置提醒一次。
End Sub
Sub tx() '设置一个显示提醒消息的宏(名称要与上述自动运行宏中调用的名称一致)。
Dim prtfileName As String
prtfileName = "e:\\abc.xps"
Sheets("Sheet1").Select
ActiveSheet.PrintOut From:=1, To:=1, PrintToFile:=True, Copies:=1, PrToFileName:=prtfileName
End Sub
网友评论
- 很实用很不错的资料,谢谢楼主分享,赞楼主一个!
- 资源很好 但是没怎么看懂。每周一定时(9:30)自动打印文件的编码怎么整?求教!!!