I'm developing a macro in excel that through a list of ids and passwords in excel logs into a website and tries to download a pdf. I can log in to the site and navigate to the button that generates the pfd. The problem is that the button triggers a function in javascript that opens the pdf in a new window.
Button code
<td><input
class="tB" type="button" value="Emitir" onClick="javascript:obterFormulario()">
<br></td>
VBA to open pfd:
objIE.Navigate "javascript:obterFormulario('','')"
Thanks in advance to anyone who can help me.