Link to home
Start Free TrialLog in
Avatar of MaGnuMark
MaGnuMark

asked on

Run VB6 code from web file opened NOT SAVED

I want to be able to have my VB6 code read the contents of a text file from a web site - but I want the user to choose: 'Open' the file which launches my app- NOT save the file then open.  Is the file TEMP saved in C:\Windows\TEMP directory?

Thank you in advance for any and all help.

Mark
Avatar of bobbit31
bobbit31
Flag of United States of America image


if you just want to show the user a webpage in your app:

reference ms internet controls under project/components, then:

WebBrowser1.navigate "<url>"
While WebBrowser1.ReadyState <> READYSTATE_COMPLETE
  DoEvents
wend
Avatar of MaGnuMark
MaGnuMark

ASKER

I'll try to be a little more specific.  Our web page contains a link.  When the user clicks on that link, they get a windows message "Would you like to open the file or save it to your computer?"  I need them to be able to choose 'Open' and have my app launch and read the contents of that text file.  I am able to read from the text file if I only knew were it gets temporarily saved - if infact that is how it works.

Hope the extra details helps.
Mark
Here would be a similiar example to what I'm trying to pull off - You click a web link to a .TXT file -you have the option to OPEN or SAVE the file - You click OPEN, and Notepad opens the file and displays the contents on the .TXT file.  How do I get my app to read the information (Like Notepad does) contained in that same .TXT file without first saving the file?  

Thanks for looking
Mark
OK - I know where the file is saved to....C:\Documents and Settings\[UserName]\Local Settings\Temporary Internet Files\IE5.Content\{some randomly generated folder name}

Question Now - how do I get this path from the Registry.  Manually searching the Registry I found where this path is kept.  But how do I get it using VB6?

Please Help - My project is gathering dust...

Thanks
Mark
ASKER CERTIFIED SOLUTION
Avatar of bobbit31
bobbit31
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thanks for your direction bobbit31.  I ended up having to write in a file search to locate file so that it could be executed, and run my associated app.