Hey all,
Nutshell of needs:
Support with two things 1)code to click a specific link on a website and 2)downloading the PDF on the page it loads.
As of right now, I can get to the page I want, but I can't seem to write code that will click the link I need. Second, which I have only done a little research on, is now that I'm on the webpage, writing code to download the PDF. Any help is greatly appreciated!!
Couple notes: The link in my code seems to be only temporary for the session when you first do the search, so you will need to start with the "property search" link below and enter the parcel number as well. This will produce a new unique URL that you will need to replace my link in my code for yours to work. Once you do this you seem to be able to close out and re-use your new link.
SUPPORT INFO:
multcoproptax.com/Property-Search
Parcel Number: R246326
Thanks all,
Sub ClickLinkDownload()
Dim ie As InternetExplorer
Dim html As HTMLDocument
Dim Link As Object
Dim ElementCol As Object
Set ie = New InternetExplorer
ie.Visible = True
'***below seems like this is only a temporary link, needs to be updated with the instructions above -- I'm too new to post this link so I just left a note, sorry!***
ie.navigate "YOUR NEW URL LINK GOES HERE AFTER YOUR FIRST SEARCH"
Do Until ie.readyState = READYSTATE_COMPLETE
DoEvents
Loop
ie.document.getElementById("tabBills").Click
For Each Link In ie.document.getElementsByTagName("a")
If Link.href = "2019" Then
Link.Click
Exit For
End If
Next Link
'CODE FOR DOWNLOADING PDF GOES HERE
Set ie = Nothing
Application.ScreenUpdating = True
End Sub
Bookmarks