Re: programmatically capture web page as internet archive (MHT)

From: Michael Harris \(MVP\) ("Michael)
Date: 05/13/04


Date: Wed, 12 May 2004 18:37:41 -0700


> We have some ASP pages on the corporate intranet that report various
> business statistics. We would like to capture a snapshot of these
> reports each night about midnight by running a scheduled script.
>
> We've been unsuccessful at finding any examples of how a script can
> capture a web page, preferably to an internet archive file (MHT).
>
> We've been able to build a kludge using Word VBA to generate an HTML
> file, but it requires some cleanup after capture. We were hoping for
> something that might do the equivalent of IE's File>Save As>Web
> Archive, but from script.

url = "http://www.yahoo.com"
path = "c:\_temp\yahoo.mht"
Const wdFormatWebArchive = 9
set word = createobject("word.application")
set doc = word.documents.open(url)
doc.saveas path,wdFormatWebArchive
doc.close
word.quit

Disclaimer: Server side Office automation is neither recommended nor
supported by Microsoft...

Q257757 - INFO: Considerations for Server-Side Automation of Office
http://support.microsoft.com/default.aspx?kbid=257757

-- 
Michael Harris
Microsoft.MVP.Scripting
Sammamish WA US


Relevant Pages

  • Re: programmatically capture web page as internet archive (MHT)
    ... > set stream = message.GetStream ... >> We have some ASP pages on the corporate intranet that report various ... We would like to capture a snapshot of these ... >> each night about midnight by running a scheduled script. ...
    (microsoft.public.scripting.wsh)
  • Re: programmatically capture web page as internet archive (MHT)
    ... >> We have some ASP pages on the corporate intranet that report various ... >> reports each night about midnight by running a scheduled script. ... >> We've been able to build a kludge using Word VBA to generate an HTML ... but it requires some cleanup after capture. ...
    (microsoft.public.scripting.wsh)
  • programmatically capture web page as internet archive (MHT)
    ... We have some ASP pages on the corporate intranet that report various ... We've been unsuccessful at finding any examples of how a script can capture ... preferably to an internet archive file. ...
    (microsoft.public.scripting.wsh)
  • Re: programmatically capture web page as internet archive (MHT)
    ... capture the page as it looked, that is, with all the linked images. ... > returned by the Open method. ... >> We have some ASP pages on the corporate intranet that report various ... >> each night about midnight by running a scheduled script. ...
    (microsoft.public.scripting.wsh)
  • Re: Best computer PC/network inventory software
    ... Neither program does everything you want, but you can usually work around things that they don't - for example, creating a script and running that script remotely on all systems to add Asset Tag info. ... Automatically capture PC info over the network, ...
    (microsoft.public.windows.server.general)

Loading