Hello together
I am trying to print a html file by using active x with object "IWebBrowser2" and it's my first time that I use active x 🙂
Setup: LabView 2019, 32-bit with Win7 64-bit computer.
What I want to do:
- Using active x to open a local stored html file by using the object "IWebBrowser2" --> Works fine
- Use the command "print file" with "do not prompt user" --> doesn't work
Goal ist to program the sequence like an operator opens the html file, which opens it with the InternetExplorer/Firefox and clicks on File-Print.
I know that I could use the "report generation" but after some tests, I would like to use the way with active x.
First question - are there some negative points by using active x?
Second question - could anybody help me, why my code doesn't work?
Someone had the same problem as I have, but even with his solution, it does not work: https://forums.ni.com/t5/LabVIEW/Print-file-via-ActiveX-and-it-is-not-found-always/td-p/1667298/page...
I analysied as well the code under find examples "browser" -> "ActiveX Event Callback for IE", but can't find my bug.
Alll Vi's with html-file are attached.
Why are there so many "IWebBrowser2" Objects and how can I find out which one is the one, that I need? Because I saw that the property/invoke nodes entries changes sometimes by using another object...
So this is my first vi. Silent and Visible doesn't work, it opens always the internet explorer, but it open it:
and the second one, which is never exectued (callback vi):
It doesn't work even if I copy this code into the first vi. I always receive an error...
Thx in advance.