Via research on this site and using Google, I've put together a Sub procedure to open the web page for tracking Purolator parcels. However, I'm not having much luck in working out how to input the parcel number to be tracked.
By commenting out various lines, I've found that all other lines work (including the line to submit the request after a parcel number is entered) but I can't work out how to get the line in bold red font to work.
I know this is at least partly because of my complete lack of familiarity with HTML I'm hoping someone on this site who isn't totally ignorant in this area might be able to point me in the right direction.
The code as it stands is this:
By commenting out various lines, I've found that all other lines work (including the line to submit the request after a parcel number is entered) but I can't work out how to get the line in bold red font to work.
I know this is at least partly because of my complete lack of familiarity with HTML I'm hoping someone on this site who isn't totally ignorant in this area might be able to point me in the right direction.
The code as it stands is this:
Code:
Private Sub CARRIER_TRACKING_NO_DblClick(Cancel As Integer)
Dim ie As Object
Dim strTrackingNo As String
On Error GoTo Err_Point
If Len(Replace(Nz(CARRIER_TRACKING_NO, ""), " ", "")) = 0 Then
Exit Sub
Else
strTrackingNo = CARRIER_TRACKING_NO
End If
Set ie = CreateObject("InternetExplorer.Application")
ie.Navigate "[URL]https://www.purolator.com/en/ship-track/tracking-summary.page[/URL]?"
ie.Visible = True
While ie.Busy
DoEvents
Wend
[COLOR=red] [B]ie.Document.all("Search").Value = strTrackingNo[/B][/COLOR]
ie.Document.getElementById("buttonTrackSearch").Click
Exit Sub
Err_Point:
strMsg = Err.Number & Chr(13) & Err.Description
strTitle = "Error during translation"
strResponse = MsgBox(strMsg, vbCritical, strTitle)
End Sub