473,473 Members | 2,032 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

OutputTo command to an FTP

37 New Member
Hello. I'm using Access '07 and I need to regulariliy put a PDF on a FTP site. Can I do this directly with the outputto command?
Expand|Select|Wrap|Line Numbers
  1. DoCmd.OutputTo acOutputForm, form_name, acFormatPDF, "ftp://files.myftpsite.com/" & lotnum & ".pdf", False
I can't seem to make this work. Or do I need to use the OutputTo command to a local file upload separately. I can do the steps separately just fine but I always prefer to do in one command line what I could do in two.
If anyone has gotten this to work in a simpler fashion I'd love to hear about it.
Carl
Mar 31 '09 #1
9 2689
Swarve
2 New Member
Hi Carl,

I've used batch files to automate a process similar to yours:
Expand|Select|Wrap|Line Numbers
  1. @echo off
  2. REM Creates text file containing FTP commands
  3. echo open <SERVER_NAME> >cmdlist.txt    
  4. echo <USERNAME> >>cmdlist.txt
  5. echo <PASSWORD> >>cmdlist.txt
  6. Echo Put <PDF FILENAME> >>cmdlist.txt
  7. Echo BYE >> cmdlist.txt
  8. Echo Copying Files from server
  9. ftp -s:cmdlist.txt >>results.txt  REM Creates a log file of the commands sent and responses received
  10. del cmdlist.txt  REM removes the text file containing the commands
Cheers,

P
Mar 31 '09 #2
Carl Witte
37 New Member
Out of curiosity do you find the log file to be of particular use? To date I only create and use a log file when I have an error indicating a failure. Carl
Apr 1 '09 #3
Swarve
2 New Member
Hi Carl,

The log file has come in useful a couple of times to track back to a certain date that the ftp batch file failed and ensure that the required files were transferred.

Cheers,

P
Apr 1 '09 #4
Carl Witte
37 New Member
Thanks for your help.
Apr 1 '09 #5
NeoPa
32,556 Recognized Expert Moderator MVP
Elegant solution Swarve.

Welcome to Bytes!
Apr 3 '09 #6
NeoPa
32,556 Recognized Expert Moderator MVP
For further reading on the matter and the concepts see http://bytes.com/topic/access/answer...p-transfer-vba
Apr 3 '09 #7
Carl Witte
37 New Member
Thank NeoPa. Missed it when I was looking through my search of the archives.
I'm using the wininet.dll with no problems for the transfer. My concern was after I have connected to the FTP site could outputto place the file there directly or did the file have to be written locally then transferred. It appears the answer is the file has to be written locally then transferred.

Thanks again for your help.
Carl
Apr 3 '09 #8
NeoPa
32,556 Recognized Expert Moderator MVP
Ah. I hadn't appreciated that.

Good luck with your project anyway :)
Apr 3 '09 #9
Carl Witte
37 New Member
No problem. I probably wasn't clear in my original post. :-)
Carl
Apr 3 '09 #10

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

Similar topics

0
by: Victor Kaiser | last post by:
I am using DoCmd.OutputTo to allow users to save Access reports in snapshot format or other desired formats. Once the user selects the desired format and clicks "OK", a dialog box appears that...
0
by: Frank Barnhart | last post by:
We have an application which runs Access under automation. With Access 97, the app included this line to send a report to a text file: myAccessObject.DoCmd.OutputTo acOutputReport, ,...
1
by: paul.hanti | last post by:
This board has been a plethora of information. Thanks to all that respond! I have a quick question regarding the built-in OutputTo macro. I've built a shared database in Access 2003 (in Access...
4
by: tmountjr | last post by:
I've got a user who's trying to export a text file with unicode formatting. When he exports it as straight ascii, some of the foreign characters (mostly just accent marks and the like - no...
3
by: ljungers | last post by:
I need to make some changes to a Query/select/print report using word application. What I need to do is change the way Word is called yet keep the process the same. Word is used so changes can be...
5
by: dancole42 | last post by:
I have a question regarding the DoCmd.OutputTo function. I have an invoice report that shows all of the invoices for a particular date. I want to create a button that will export each page of...
4
by: jonosborne | last post by:
Hi, I have a database which allows users to either Print, Preview or Export their reports, using the OpenReport command for the Print and Preview and the OutputTo command for Exporting. ...
2
by: Jim Devenish | last post by:
I have a report which can be displayed on the screen with: DoCmd.OpenReport "RemittanceAdvice",acViewNormal,,"PaymentID = " & paymentRecID I now wish to create a snapshot of this, using the...
1
by: pdxrichard | last post by:
Windows XP - Server 2003 - Access 2007 VBA - Code behind a form Here is my code. Why can't I find the exported file if the directories exist and there are no permission problems? Isn't a save...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
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
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
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
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
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
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 ...

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.