6
I am developing a macro in excel that through a list of id and passwords in excel logs into a website and tries to download a pdf. I can log into the site and navigate to the button that generates pfd. The problem is that the button triggers a javascript function 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('','')"
From now on I thank anyone who can help me.
Hello. Welcome to SOPT. It’s hard to help without more details. When you say that the problem is that it opens in a new window, what exactly is your difficulty? Can’t you access the window? Also did not understand the code snippet in VBA. What you expect it to do?
– Luiz Vieira
Well, for lack of detail, I may have misunderstood what your problem is. But if what you want is to trigger the event that is on the button , search by the method
.FireEvent("event")
– Daniel Aristofanes
Behold this answer where you probably need to trigger an event.
– danieltakeshi