473,499 Members | 1,974 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

VBA Transfer Text with non static file name.

31 New Member
Using VBA, is there a way to transfer text a table or query and have the saved file name be some text followed by todays date (example"newfile.11.17.08.txt).

Also can that file then be winzipped and emailed using VBA? I know how to email it, but I want to zip it first.

Thank you for any help with this.
Nov 17 '08 #1
2 3777
Stewart Ross
2,545 Recognized Expert Moderator Specialist
Hi, and Welcome to Bytes!

If you are using the DoCmd.TransferText method to output to a text file you will be supplying the filename as a string. You can always add the date to that string before you specify the file extension, using the Format function:

Expand|Select|Wrap|Line Numbers
  1. DoCmd.TransferText acExportDelim, , "YourTable", "C:\yourfilename " & format(Date(), "yymmdd") & ".txt"
This adds the date year-first - 081118 for 18 November 08. You can change this to whatever suits you.

There is no direct way to zip your file from VBA code. Attachments can be e-mailed from VBA, but there is no interface to products like WinZip.

-Stewart
Nov 18 '08 #2
apank
31 New Member
Thank you for your help Stewart.
Nov 18 '08 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

1
6794
by: lkr | last post by:
hi i got one file transfer program using serialization which has a limitation that i can send only 8192 bytes(8KB). i want to send more than that wht can i do. how can i divide the file into...
8
3869
by: bryan | last post by:
I've got a custom HttpHandler to process all requests for a given extension. It gets invoked OK, but if I try to do a Server.Transfer I get an HttpException. A Response.Redirect works, but I really...
6
4577
by: ad | last post by:
I wnat to load a file in an .resx file and transfer the file to a stream. How can I do?
5
8214
by: raghubr | last post by:
Hi all, Can any one pls guide me through..I need to transfer the file from server to client and client to server using sockets in an Asynchronous mode so this file transfer doesn't hinder the...
0
4065
by: JosAH | last post by:
Greetings, the last two article parts described the design and implementation of the text Processor which spoonfeeds paragraphs of text to the LibraryBuilder. The latter object organizes, cleans...
1
5560
by: shyaminf | last post by:
hi everybody! iam facing a problem with the transfer of file using servlet programming. i have a code for uploading a file. but i'm unable to execute it using tomcat5.5 server. kindly help me how to...
0
1128
by: agarwasa2008 | last post by:
A macro question. I have action:Transfer Text with the following settings: ------------------------------------ Transfer Type: import Fixed Width Specification Name: ?? Table...
3
4630
by: agarwasa2008 | last post by:
A macro question. I have action:Transfer Text with the following settings: ------------------------------------ Transfer Type: import Fixed Width Specification Name: ?? Table...
0
10705
Debadatta Mishra
by: Debadatta Mishra | last post by:
Introduction In this article I will provide you an approach to manipulate an image file. This article gives you an insight into some tricks in java so that you can conceal sensitive information...
0
7007
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7220
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
7388
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5470
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
4919
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
3099
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
1427
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
665
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
297
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.