次の VB で .html ファイル/URL をバッチ処理するソリューションを探しています。Microsoft Word で開く .html ファイルを保存したいと考えています。
これは私が使用しているコードですが、複数の .html ファイルで機能する必要があります。
Option Explicit
'Just change these two lines
Const HTMLFileIn="http://www.example.com"   
Const DocFileOut="H:\Word"
Dim MyWord,oIE
Set MyWord=CreateObject("Word.Document") 
Set oIE=CreateObject("InternetExplorer.Application")
oIE.Navigate HTMLFileIn
Attend
oIE.document.body.createTextRange.execCommand("Copy")
Attend
MyWord.Content.Paste
MyWord.SaveAs DocFileOut
MyWord.Close
oIE.Quit
Set oIE=Nothing
Set MyWord=Nothing 
MsgBox HTMLFileIn & " is now saved as " & DocFileOut
Sub Attend
    Wscript.Sleep 500
    While oIE.busy
        Wscript.Sleep 1000
    Wend
    While oIE.Document.readyState <> "complete"
        Wscript.Sleep 1000
    Wend
End Sub