Web Scrapping - Download PDF after submitting Policy

karanrp

New Member
Joined
Oct 3, 2019
Messages
2
I want to download the PDF file after pressing "Continue" with below code...

================================Code=========================
Sub automaticformfilling()

Dim ie As Object

Set ie = CreateObject("internetexplorer.application")

'1 GoTo website

With ie
.Visible = True
.navigate "https://www-400.aig.com/vl/emarine/home1?ACTION=home"
'Wait for loading
Do While .busy
DoEvents
Loop

Do While .readystate <> 4
DoEvents
Loop
For Each continuebuttonfilled In ie.document.getElementsByTagName("input")
If continuebuttonfilled.getAttribute("value") = "Continue" Then
continuebuttonfilled.Click
Exit For
End If
Next continuebuttonfilled

Do While .busy
DoEvents
Loop

Do While .readystate <> 4
DoEvents
Loop
=================================code===============================

I want to download PDF file and save it to activeworkbook's folder.

If anyone can suggest how to execute the code for download, I can proceed further.
=====================================Internet Explorer====================================



<html>
<head>
****** http-equiv="Content-Type" content="text/html" charset="iso-8859-1">
****** name="GENERATOR" content="Mozilla/4.72 [en] (WinNT; I) [Netscape]">
<title>Display Quote PDF</title>
******** language="JavaScript" type="text/javascript" src="/escreens/js/aig_stylesheets.js">*********>
</head>

<frameset rows="90,562*" frameborder="NO" border="0" framespacing="0" cols="*">
<frame name="topFrame" scrolling="NO" noresize src="/escreens/getquote/top_frame.htm" >
<frameset cols="162,797*" frameborder="NO" border="0" framespacing="0" rows="*">
<frame name="leftFrame" scrolling="NO" noresize src="/escreens/getquote/left_frame.htm">
<frame name="mainFrame" src="/escreens/getquote/pdf_quote_mainframe.jsp">

</frameset>
<noframes>****** bgcolor="#FFFFFF">

</body></noframes>
</html>
=====================================Internet Explorer====================================
 

Excel Facts

Return population for a City
If you have a list of cities in A2:A100, use Data, Geography. Then =A2.Population and copy down.
FULL PAGE SOURCE AS BELOW

<html>
<head>
****** http-equiv="Content-Type" content="text/html" charset="iso-8859-1">
****** name="GENERATOR" content="Mozilla/4.72 [en] (WinNT; I) [Netscape]">
<title>Display Quote PDF</title>
******** language="JavaScript" type="text/javascript" src="/escreens/js/aig_stylesheets.js">*********>
</head>

<frameset rows="90,562*" frameborder="NO" border="0" framespacing="0" cols="*">
<frame name="topFrame" scrolling="NO" noresize src="/escreens/getquote/top_frame.htm" >
<frameset cols="162,797*" frameborder="NO" border="0" framespacing="0" rows="*">
<frame name="leftFrame" scrolling="NO" noresize src="/escreens/getquote/left_frame.htm">
<frame name="mainFrame" src="/escreens/getquote/pdf_quote_mainframe.jsp">

</frameset>
<noframes>****** bgcolor="#FFFFFF">

</body></noframes>
</html>
 
Upvote 0

Forum statistics

Threads
1,214,534
Messages
6,120,084
Members
448,943
Latest member
sharmarick

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top