以pdf格式将报告导出到当前桌面 [英] Export a report to the current desktop in pdf format

查看:134
本文介绍了以pdf格式将报告导出到当前桌面的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我希望始终将特定报告作为pdf文档导出到当前的桌面文件中。该特定PC的一部分,没有对用户进行硬编码。在vba中的那台计算机。我当前的vba是:

I would like to always export a particular report as a pdf document to the current "desktop" of that specific PC, without hardcoding the "user" of that computer in the vba. My current vba is:

展开 | 选择 | Wrap | 行号

推荐答案

我不知道这是否适用于VBA,但在Windows脚本中,%username%取代了文件路径中的用户名。这可能是需要考虑的事情。


编辑:如果这是必须在Win XP& 7,只知道每个操作系统的文件路径不同。 XP使用Documents and Settings而7使用Users。我不知道如何告诉数据库使用哪条路径。我通常在C:\驱动器上创建一个文件夹,然后在桌面上创建一个快捷方式,如果需要的话。它简化了VBA端。
I don''t know if this works in VBA, but in windows scripting the %username% takes the place of the user name in the file path. It might be something to look into.

If this is something that will have to work across Win XP & 7, just know that the file path is different for each OS. XP uses Documents and Settings while 7 uses Users. I''m not sure how to tell the database which path to use. I normally make a folder on the C:\ drive and then make a shortcut on the desktop to that folder if I need to. It simplifies the VBA end.


它仅用于不同的Windows 7机器。
It will be for different windows 7 machines only.


好的。我没有可以使用的测试数据库,但您可以尝试以下方法:
Okay. I don''t have a test database to work with, but you could try the following:
展开 | 选择 | Wrap | 行号


这篇关于以pdf格式将报告导出到当前桌面的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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