下記ソースのuserId、password、お客様番号の3箇所をご自分のものの代入文に変更してください 何とか.vbsの名称で保存、ダブルクリックで実行できます 以下ソースです Set xShell = CreateObject("Shell.Application") win_s = False For Each Window In xShell.Windows '対象URLが表示されているか? If TypeName(Window.Document) = "HTMLDocument" Then if Window.Document.url="https://www.billing.ntt-east.co.jp/entrance" then Set objIE0 = Window '対象URLが表示→その画面を使う
exit for end if end if next if win_s=false then '対象URLが非表示→新しく画面を開く Set objIE0 = CreateObject("InternetExplorer.Application") objIE0.Visible = True objIE0.Navigate "https://www.billing.ntt-east.co.jp/entrance" call waitPage(objIE0) end if objIE0.document.all.userID.value="" ' userId index=0
objIE0.document.all.okyakusamaDenban.value="" ' お客様番号 index=2 objIE0.document.all.LoginAction.click Sub waitPage (objIE) Do While objIE.busy Loop