从命令按钮打印Excel文件 [英] Print Excel file from command button

查看:268
本文介绍了从命令按钮打印Excel文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好,


是否可以从命令按钮打印excel文件?


谢谢

兰斯

解决方案
查看Shell命令。

导向这个允许开始每个应用,用于Excel使用Excel .exe和转向parm用文件名打印它。


Nic; o)



查看Shell命令。

这将允许启动每个应用程序,excel使用excel .exe和带文件名的转向parm来打印它。


Nic; O)


谢谢,我会看看是否能工程
我忘记所有的specifcs但Access中应该是这样的:


Dim xlapp作为Excel.Application

xlapp.Workbooks.Open" c:\ myworkbook.xls"

xlapp.ActiveSheet.PrintOut

xlapp.Workbooks.Close


这会假设您要打印活动工作表(首次打开Excel时视图中的工作表。


Hello,

Is it possible to print an excel file from a command button?

Thanks
Lance

解决方案

Check out the Shell command.
This wil allow starting every application, for excel use the excel .exe and the steering parm with the filename to print it.

Nic;o)


Check out the Shell command.
This wil allow starting every application, for excel use the excel .exe and the steering parm with the filename to print it.

Nic;o)

thanks, I will see if that works


I forget all the specifcs but within Access should be something like this:

Dim xlapp As Excel.Application
xlapp.Workbooks.Open "c:\myworkbook.xls"
xlapp.ActiveSheet.PrintOut
xlapp.Workbooks.Close

This would assume you wanted to print the active sheet (the one in view when you first open excel.


这篇关于从命令按钮打印Excel文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆