Simulate "Save Target As" using MSHTML

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Does anyone know how to simulate the right click "Save Target As" using
MSHTML?

I find that I can navigate through the LinksCollection on any given page but
often these links are links to files (*.doc, *.xls etc). If I follow the
link, it will open the document, but I am interested in saving it. Any ideas?
 
John,

Not that I have directly the answer, know that if you reuse HTML the
behaviour will be as Interenet explorer.

Therefore you can not save unintended the doc somewhere on disk. However you
can save the outertext from the HTML tag what is beside the first header
mostly complete the page.

I hope this helps,

Cor
 
John said:
Does anyone know how to simulate the right click "Save Target As" using
MSHTML?

I find that I can navigate through the LinksCollection on any given page
but
often these links are links to files (*.doc, *.xls etc). If I follow the
link, it will open the document, but I am interested in saving it.

You could download the file using 'WebClient.DownloadFile'.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top