通过VBA将MS Excel 2003工作簿导出到PDF [英] Exporting an MS Excel 2003 workbook to PDF via VBA

查看:125
本文介绍了通过VBA将MS Excel 2003工作簿导出到PDF的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个Excel 2003工作簿,其中包含一个宏,以将其某些表格复制到新的工作簿,然后保存并关闭新的工作簿。这样做十几次,每次都有略微不同的表格选择。



我想为宏将额外的工作簿的电子表格导出到PDF中添加一个额外的步骤。这样做的明显方法是使用PDF打印机和Excel的内置打印功能,但大多数PDF打印机在完成之前会给您一个另存为...对话框。显然,单独输入这七十个场合没有吸引力 - 所以我想要一些允许我提前设置的东西(可能使用正在打印的文件的文件名减去其扩展名),然后选择默认选项。



为此免费的PDF打印机的任何想法?或者一个合适的选择?

解决方案

Office 2007允许这样做。我发现 PDFCreator 是好的,VBA包含在示例文件中,并且听说过<一个href =http://www.cutepdf.com/ =nofollow noreferrer> CutePDF 也不错。 PDFCreator和CutePDF是免费的。


I have an Excel 2003 workbook that contains a macro to copy certain of its sheets across to a new workbook, then save and close the new workbook. It does this several dozen times, with slightly different sheet selections each time.

I would like to add an extra step to the macro to export the secondary workbooks' spreadsheets to PDF. The obvious way to do this would be to use a PDF printer and Excel's built in Print function, but most PDF printers give you a "Save As..." dialogue box before they finish. Obviously, typing this in individually for seventy-odd occasions lacks appeal - so I'd like something that allows me to set it ahead of time (probably "Use the filename of the file I'm printing minus its extension") then just select the default options.

Any ideas for a free PDF printer that does this? Or a suitable alternative?

解决方案

Office 2007 allows for this. I have found PDFCreator to be good, the VBA is included in sample files, and have heard that CutePDF is also good. PDFCreator and CutePDF are free.

这篇关于通过VBA将MS Excel 2003工作簿导出到PDF的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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