我需要从网站上获取详细信息(即托运人,收货人姓名)以及所有要保存在C盘中的文件。
一次可以跟踪多个引用,下面是代码。
当我进一步打开文档时,网络链接未显示任何文件引用。
如何循环链接?
Option Explicit
Public Sub Login()
Dim ie As New InternetExplorerMedium
'Dim ie As New InternetExplorer 'InternetExplorerMedium
With ie
.Visible = True
.navigate "https://portal.expeditors.com/expo/login"
While .Busy Or .readyState < 4: DoEvents: Wend
With .document
With .getElementById("j_username")
.Focus
.Value = "bom-sumand"
End With
With .getElementById("j_password")
.Focus
.Value = "jun-2018"
End With
.getElementById("signInBtn").Click
End With
While .Busy Or .readyState < 4: DoEvents: Wend
ie.Visible = True
ie.navigate "https://expo.expeditors.com/expotr/expotr?action=com.expd.webapp.tracking.action.searches.SearchWebAction&SearchType=advancedshipment.BaseAdvancedShipmentSearch&reference=4320112556"
While .Busy Or .readyState < 4: DoEvents: Wend
ie.Visible = True
ie.navigate "https://expo.expeditors.com/expotr/expotr?action=com.expd.webapp.tracking.action.document.DocumentImageDownloadWebAction&Type=Image.Get&xref=utbY7EWF98bNjBJgJX0qGubmHC8KZv9cJLDToqpU3UOz8RpExFamOA%3D%3D"
End With
End Sub
我是VBA网页编码的新手。我已经做了很多VBA Excel和Outlook脚本。