下記のjavascriptのfileをエクセルVBAから立ち上げていますが、EXCEL VBAの中から実行したいと思ってるのですが、わかりません。やることは、VBAからホームページ内のパスワードを入力して、ページを進んでいくだけなのです。その最後の行きたいページをexcelVBAのコードの中で実行したいと思ってます。
出来ればEXCEL VBAのサンプルコードを教えてほしいです。
var IE = WScript.CreateObject("InternetExplorer.Application");
IE.Visible = true;
IE.Navigate("
http://dms.aaanet/aaa/GetPubliLogin.do");while(IE.busy) ;
while(IE.Document.readyState != "complete") ;
IE.Document.all('loginForm').username.value = "15555893";
IE.Document.all('loginForm').password.value = "02222";
IE.Document.all('loginForm').submit();
while(IE.busy) ;
while(IE.Document.readyState != "complete") ;
var modelName ="C777";
var modelTitle="777";
var nodeId="2";
function switchPublication(modelName,modelTitle, nodeId){
IE.Document.publicationForm.modelName.value = modelName;
IE.Document.publicationForm.modelTitle.value = modelTitle;
IE.Document.publicationForm.tocId.value = modelName;
IE.Document.publicationForm.nodeId.value = nodeId;
IE.Document.publicationForm.submit();
}
switchPublication('C777','777', '2');
while(IE.busy) ;
while(IE.Document.readyState != "complete") ;
IE.Navigate("
http://dms.aaaa/AAL/ViewAsPDF.do?WSb=C877");