This is the html code for the button:
All the attachments should be downloaded to specific folder with Order number as a folder name. Order numbers are listed in Column A of the Sheet1 (based on Order number we ill search the results)
I found this piece of code...
Sub AANs()
Dim Dates As Object, Matters As Object, i As Long,
Ws As Worksheet
Dim L As Long
Lr As Long Dim Html As MSHTML.HTMLDocument
Lr1 = ThisWorkbook.Sheets("Sheet1").Cells(Rows.Count, 1).End(xlUp).Row
Dim ie As New InternetExplorer
'SETTING IE FOR Order NUMBERS
For L = 2 To Lr1
Set Ws = ActiveWorkbook.Sheets("Sheet2")
Set ie = New InternetExplorer ie.navigate www.abc.com/sc/wo/index?id=" & _ ThisWorkbook.Sheets("Sheet1").Range("A" & L)
ie.Visible = True Application.Wait Now + TimeValue("00:00:05")
Set Html = New MSHTML.HTMLDocument
Html.body.innerHTML = ie.document.querySelectorAll(".btn btn-default")
Set Dates = Html.querySelectorAll(".wo-attachments-link") < GOT stuck here
Hi Rajsha,
Never done this with VBA, I have to wonder why you are using Excel to do this? Doesn't seem the like the best tool.
You could try using Selenium https://www.myonlinetraininghub.com/web-scraping-filling-forms
Then by clicking the download button the file will download.
Driver.FindElementById("download-button-ID").Click
You may need to set some preferences in Chrome to save without asking you to save the file.
If you were to use Python it would be easier.
Regards
Phil
Hi Rajsha,
OK, not sure why you don't have access to Selenium or Python, they are both free. As I'm not familiar with your environment or the restrictions on it I'm a bit stuck as to offer assistance.
Phil
Hi Philip,
I just what to know with you, how to send specific mail to you directly. Could you please let me know once if i want to check with you in regarding with this query back again.
Thanks
Rajsha
Hi Rajsha,
You can contact me via this forum.
Regards
Phil