|
-
Apr 6th, 2011, 03:19 PM
#1
Thread Starter
New Member
IE Download File Prompt
Hi All,
I am in the process of making a Macro to automate a tedious process I go throguh every week. I have a bunch of logins in an excel file. I have to go to an internal website/database and download an Excel file for each login. It takes the first couple of days of every week to pull the files as I have about 100 or so reports I have to pull.
With help from others on this forum which is greatly appreciated. I have compiled code to retrieve the login info from the excel file, Navigate to the website, login, navigate multiple iframes, select criteria for report, and select the "Run" button.
I am now at the point where I receive a Download File prompt to Open, Save or Cancel. I need help selecting Save and then selecting a path to save the file.
I have seen the API Downloadfile code but I do not have a known URL. The end of the URL has a "#" instead of a report number or anything to identify it by.
Below is some of the code for the Run button.
Code:
<!-- 'Run' button code starts -->
<td width="8" height="28">
<table border="0" cellpadding="0" cellspacing="0"
onClick=
"document.TargetGeneralQueryForm.submitButton.value='setQueryInfo';
document.TargetGeneralQueryForm.runCriteria.value=document.TargetGeneralQueryForm.elements['run_query'][0].options[document.TargetGeneralQueryForm.elements['run_query'][0].selectedIndex].value;
document.TargetGeneralQueryForm.userAction.value='run';document.TargetGeneralQueryForm.queryID.value='-1';submitQueryFormWithDoBeforeSubmit('TargetGeneralQueryForm','SetTargetGenQueryInfo.view');return false;"
title='Run'>
<tr>
<td class="btnLeft"><img border="0" src="/tcf/common/images/Target/spacer.gif" width="10" height="1">
</td>
<td class="btnMiddle">
<a href='#' class="buttonLink" id ="run">Run</a>
</td>
<td class="btnRight"><img border="0" src="/tcf/common/images/Target/spacer.gif" width="10" height="1"></td>
</tr>
</table>
</td>
<!-- 'Run' button code ends -->
I have also thought about temporarily adjusting the registry keys to change the default from cancel to save and then set the download path.
please let me know if I can provide any additional info.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|