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

Format cells as date
Select range and press Ctrl+Shift+3 to format cells as date. (Shift 3 is the # sign which sort of looks like a small calendar).
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,223,908
Messages
6,175,304
Members
452,633
Latest member
DougMo

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