出口报告为PDF&保存今天的日期 [英] Export Report as PDF & Save with Today's Date

查看:73
本文介绍了出口报告为PDF&保存今天的日期的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试创建一个宏来每天保存PDF。以下是我到目前为止的情况。输出文件代码可能会给我带来问题。


谢谢!

I am trying to create a macro to save the PDF each day. The following is what I have so far. The Output File code is the one that is probably causing me problems.

Thanks!

展开 | 选择 | Wrap | 行号

推荐答案

您是否收到错误消息或者是否产生了您想要的结果?如果您收到错误消息,请提供准确的措辞。


虽然这不重要,但您已将OutputFile字符串拆分得比您需要的多。你应该可以使用
Do you get an error message with this or does it just not produce the results that you want? If you get an error message, please provide the exact wording.

While this shouldn''t matter, you have split up your OutputFile string more than you need to. You should be able to use
展开 | 选择 | Wrap | 行号


首先 - 感谢您的帮助。我尝试了你的代码,有没有额外的(&;它将以下文件粘贴到正确的文件夹中Media_Log-。但是,它每次运行时都会覆盖它。代码在我添加#1时首先粘贴它,直到我删除它才行。


错误消息= MS Access无法将输出数据保存到您已经拥有的文件中选择。

*文件可能是开放的 - 不是因为它每天都是新的

*使用模板 - 不是

*磁盘空间 - 不应该是一个问题
*确保文件存在于指定的路径上。??新的??

*检查以确保您拥有权限写入文件夹。这不应该是一个问题。
First - Thanks for your help. I tried your code with and without the extra "(" and it paste the following file in the right folder "Media_Log-". However, it overwrites it every time I run it. The code added a #1 when I first pasted it at the beginning, and it did not work until I deleted it.

Error message = MS Access can''t save the output data to the file that you''ve selected.
*File may be open - not because it is going to be new each day
*Using a template - not
*Disk space - should not be an issue
*Make sure the file exists on the path specified. ??New??
*Check to make sure you have permission to write to the folder. This should not be a problem.


我从来没有通过宏做过这个,所以这主要是猜测。请验证文件夹 R:\ PRIVATE\OEA\Daily_Media_Logs 确实存在。如果确实存在,那么右键单击文件夹,将鼠标悬停在New上,然后选择lect文本文档。只要它允许你创建文件,那么你就有权创建新文件。


如果这些都不起作用,我将不得不建议使用VBA作为Bytes的大多数人都没有很多使用Macros的经验,而且几乎只使用VBA。错误消息也往往更有帮助。
I have never done this via Macro, so this is mostly guessing. Please verify that the folder R:\PRIVATE\OEA\Daily_Media_Logs does exist. If if does, then right just right clicking in the folder, hover over New, and select Text document. As long as it allows you to create the file, then you have permissions to create new files.

If none of this works, I would have to recommend using VBA as most of us at Bytes don''t have much experience with Macros and use VBA almost exclusively. The error messages also tend to be a little more helpful.


这篇关于出口报告为PDF&保存今天的日期的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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