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====================================
 

karanrp

New Member
Joined
Oct 3, 2019
Messages
2
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>
 

Forum statistics

Threads
1,085,504
Messages
5,384,066
Members
401,879
Latest member
wzakaria

Some videos you may like

This Week's Hot Topics

Top