自动将当前日期添加到文件名 [英] Adding current date to a file name automatic

查看:98
本文介绍了自动将当前日期添加到文件名的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

亲爱的先生们,我在2010年的访问中创建了一个宏,我选择了使用格式导出。

在输出文件中我写了以下内容:

Dear sirs i create a macros in access 2010 and i choose " export with formatting."
Inside the "output file" i wrote the below:

展开 | 选择 | Wrap | 行号

推荐答案

1)宏或VBA

宏不等于VBA。这些是Access中使用的两种独立的编程语言


2)您告诉我们问题是什么,这是做什么与代码正在做什么。


因为当我使用今天的日期解析你的字符串时它返回: C:\documents and settings\rabih\desktop\abr\cl-140411 .pdf


3)所以看起来你应该麻烦地拍摄你的整个代码 - 遵循这里给出的指导方针:[*] >发布前(VBA或SQL)代码


4)一旦你按照上面#3中给出的基本故障排除,然后发布你的整个代码,请使用后工具栏中的[CODE /]格式按钮格式化它。
1) Macro or VBA

Macro is NOT equal to VBA. These are two separate programming languages used within Access

2) You tell us what the issue is, what is this doing vs. what it is that the code is doing.

Because when I resolve your string using today''s date it returns: C:\documents and settings\rabih\desktop\abr\cl-140411.pdf

3) So it seems that your should, perhaps, trouble shoot your entire code - follow the guidelines given here:[*]> Before Posting (VBA or SQL) Code

4) Once you''ve followed the basic trouble shooting as given in #3 above, then post your entire code, please format it using the [CODE/] format button in the post-toolbar.


对于误解我很抱歉我只使用访问宏而且这段代码没有返回你的结果它只是提供给我错误# 2302
Sorry for the missunderstanding i am using access macro only and this code didnt returned your result it simply provide me error #2302


Salame,

我不得不通过Google错误2302来获取说明。这是你应该从一开始就提供的东西。帮助我们帮助你。


我发现此链接提供了丰富的信息:
http://support.microsoft.com/kb/226526

它的结果是最可能的错误是路径不存在。假设你已经登录,因为用户rabih scurity不应该是导致问题的原因。

为什么不通过对宏进行简单的更改来迈向最终的解决方案。首先,在C:\ Temp中创建一个文件夹。只是为了确保您具有安全权限,将任何内容复制并粘贴到该文件夹​​。


然后更改宏以将文件存放在C:\ Temp中。无论宏是否有效,你都会学到一些东西。回来告诉我们是否有效,我们可以从那里开始。


JIm
Salame,
I had to Google error 2302 to get the description. That''s something you should have provided from the beginning. Help us help you.

I found this link informative:
http://support.microsoft.com/kb/226526

The upshot of it is that the most likely error is the path does not exist. Assuming you were logged in as user rabih scurity should not have been the cause of hte problem.

Why don''t you step toward a final solution by making a simple change to the macro. First, make a folder at C:\Temp. Just to be sure you have security privileges, copy and paste anything to that folder.

Then change your macro to deposit the file in C:\Temp. Whether the macro works or not you will have learned something. Come back and let us know if it worked or not and we can go from there.

JIm


这篇关于自动将当前日期添加到文件名的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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