WSH Script to save a web page as a text file - dialogue box problem 
Author Message
 WSH Script to save a web page as a text file - dialogue box problem

Hi,

I'm trying to save a series of web pages as text files using Excel and
Internet Explorer without getting a
dialogue box. The execCommand supposedly allows you to do this by setting
the parameter bUserInterface to false. I've tried this but it doesn't work -
I always get the dialogue box! Can anyone help? The code being used is

oIE.Document.execCommand "SaveAs", false, mytextfile

where oIE is my internet explorer object and mytextfile is a string variable
with the name of the file. It picks up the variable mytextfile, so all I
have to do is press enter to save the required file. Obviously I don't want
to do this 1000s of times for the pages I'm saving.

Parameters for the execCommand are

sCommand : string specifying command to execute
bUserInterface: Boolean - true = dialogue box, false = no dialogue box,
provided vValue parameter exists.
vValue: specifies file name to save.

I'd be most grateful for any help
Many thanks
Oliver

--
---------------------------------------------------------
Dr R. Oliver Hill
64 {*filter*}Lane
Milton
Cambridge
CB4 6DG
UNITED KINGDOM

Tel. +44 (0)1223 44-1519
Mobile. +44 (0) 795 666-6588



Tue, 13 Sep 2005 01:14:18 GMT  
 WSH Script to save a web page as a text file - dialogue box problem
If you are the server and client at the same time.
Not the same machine or intranet network.

No one is supposed to 'programmatically' harddrive [to do] data via a
browser.

Cookies and so on the spoil.

If you or anyone else

(not) interfacing anything (e.g. a dialog)

were true,

all'd be chaos.

------

Dualims:

Good    Bad
Client    Server

It takes two to tango


Quote:
> Hi,

> I'm trying to save a series of web pages as text files using Excel and
> Internet Explorer without getting a
> dialogue box. The execCommand supposedly allows you to do this by setting
> the parameter bUserInterface to false. I've tried this but it doesn't
work -
> I always get the dialogue box! Can anyone help? The code being used is

> oIE.Document.execCommand "SaveAs", false, mytextfile

> where oIE is my internet explorer object and mytextfile is a string
variable
> with the name of the file. It picks up the variable mytextfile, so all I
> have to do is press enter to save the required file. Obviously I don't
want
> to do this 1000s of times for the pages I'm saving.

> Parameters for the execCommand are

> sCommand : string specifying command to execute
> bUserInterface: Boolean - true = dialogue box, false = no dialogue box,
> provided vValue parameter exists.
> vValue: specifies file name to save.

> I'd be most grateful for any help
> Many thanks
> Oliver

> --
> ---------------------------------------------------------
> Dr R. Oliver Hill
> 64 {*filter*}Lane
> Milton
> Cambridge
> CB4 6DG
> UNITED KINGDOM

> Tel. +44 (0)1223 44-1519
> Mobile. +44 (0) 795 666-6588



Thu, 15 Sep 2005 12:34:28 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. save dialogue box

2. Text box text on new page text box

3. Save and Open File Dialogues?

4. Forcing file save as dialogue

5. Saving a text file from a web site

6. How can I save a web page to file using VBS

7. How can I save web page to file with VBS

8. schedule view web page and save data to file

9. Saving as a file a web page accessed via a form (doesn't work)

10. Saving a web page to file

11. VBScript to paste text into a Web text box

12. script to collect text from web pages

 

 
Powered by phpBB® Forum Software