View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
joel joel is offline
external usenet poster
 
Posts: 9,101
Default Upload file without user interaction - VBA

I'm not an expert on this, but I think you arre a little confused in what you
are asking for. I think you need to transfer a file, not send the text data
line by line. You probably need to use FTP, not HTTP.

FTP is File Transfer Protocol. HTTP is Hyper-Text Transfer Protocol. HTTP
sends the text character inside a file and displays the text to a screen.
FTP just send the files between two computers but doesn't display the text.

Your posting first says I want to upload files which is FTP.

" wrote:

Hi !

I would like to upload files to a Webserver, but the problem is that
the server only accepts uploads via FORM. The form looks like this:

<form action="upload.asp?
action=upload&type=product&item=pic1&element=&id=3 170&w=1000&h=1000&maxw=200&maxh=5000"
method="post" name="upload" enctype="multipart/form-data"
<input type="hidden" name="type" value="product"
<input type="hidden" name="item" value="pic1"
<input type="hidden" name="element" value=""
<input type="hidden" name="id" value="3170"
<input type="hidden" name="w" value="1000"
<input type="hidden" name="h" value="1000"
<input type="file" name="picture" size="28"
<input type="submit" value=" upload ""
</form

So my question is, how do I create a sub in vba/excel, which looks
like this:

public sub UploadFile( FileToUpload as string)

The sub should read the file FileToUpload, and post it on the
webserver using the form.

Any help appreciated, because I have to upload 1000+ files 8-()


/hco