Hi,
As per our internal project requirement, our solution is creating a run-time file on the user machine which needs to be sent to the application server. We do not have an FTP option and hence exploring the possibilities through a web page. This activity is to be undertaken by application as a back-end activity with user only being able to check the request status.
The internal site is designed as a simple upload webpage, which has <input type='file'> tag and we are identifying the same within Excel VBA codes by utilising HTML libraries. We've tried a number of options to get the filename and path to be visible on the textbox within the IE page which would later on passed for upload purpose.
We've almost worked out the rest of the code for automating the process but currently stuck with the exact parameter which can be utilised alongwith btnInput for uploading the filename including exact path.
The code for HTML page is as below:
<!DOCTYPE><html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><title>Untitled Document</title></head><body><form enctype="multipart/form-data" action="upload.php" method="POST"><input type="hidden" name="MAX_FILE_SIZE" value="5120000" /><input type="file" name="userfile" id="userfile" /><input type="submit" name="submitHandler" value="Upload" /></form></body></html>
We are able to successfully create a IE session, pass URL and open the webpage in VBA. However, we're currently stuck with VBA code for passing in the filename and location parameter within the text box alongwith browse.
Our rest of the codes are ready but currently stuck due to this single issue.
Hopefully, someone within the community might be able to help.
Regards,
Kapil
Rgds, Kapil