<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic ActiveX, print command to IWebBrowser2 in LabVIEW</title>
    <link>https://ni.lithium.com/t5/LabVIEW/ActiveX-print-command-to-IWebBrowser2/m-p/4067882#M1168413</link>
    <description>&lt;P&gt;Hello together&lt;/P&gt;
&lt;P&gt;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 &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Setup: LabView 2019, 32-bit with Win7 64-bit computer.&lt;/P&gt;
&lt;P&gt;What I want to do:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Using active x to open a local stored html file by using the object "IWebBrowser2" --&amp;gt; Works fine&lt;/LI&gt;
&lt;LI&gt;Use the command "print file" with "do not prompt user" --&amp;gt; doesn't work&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;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.&lt;/P&gt;
&lt;P&gt;I know that I could use the "report generation" but after some tests, I would like to use the way with active x.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;First question - are there some negative points by using active x?&lt;/P&gt;
&lt;P&gt;Second question - could anybody help me, why my code doesn't work?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Someone had the same problem as I have, but even with his solution, it does not work:&amp;nbsp;&lt;A href="https://forums.ni.com/t5/LabVIEW/Print-file-via-ActiveX-and-it-is-not-found-always/td-p/1667298/page/2?profile.language=en&amp;amp;lang=en" target="_blank" rel="noopener"&gt;https://forums.ni.com/t5/LabVIEW/Print-file-via-ActiveX-and-it-is-not-found-always/td-p/1667298/page/2?profile.language=en&amp;amp;lang=en&amp;nbsp;&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;I analysied as well the code under find examples "browser" -&amp;gt; "ActiveX Event Callback for IE", but can't find my bug.&lt;/P&gt;
&lt;P&gt;Alll Vi's with html-file are attached.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;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...&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="LN86_0-1594886406520.png" style="width: 292px;"&gt;&lt;img src="https://ip1.i.lithium.com/93225ed38f4e99d8a54531d1ef08991ad3b1d5ea/68747470733a2f2f6e692e6c69746869756d2e636f6d2f74352f696d6167652f736572766572706167652f696d6167652d69642f32373033383869394536453631464331374242443745452f696d6167652d64696d656e73696f6e732f323932783234313f763d7632" width="292" height="241" role="button" title="LN86_0-1594886406520.png" alt="LN86_0-1594886406520.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So this is my first vi. Silent and Visible doesn't work, it opens always the internet explorer, but it open it:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="LN86_1-1594890878352.png" style="width: 636px;"&gt;&lt;img src="https://ip1.i.lithium.com/4f92426ee5745695cfef84e6d364a8e734efb6a7/68747470733a2f2f6e692e6c69746869756d2e636f6d2f74352f696d6167652f736572766572706167652f696d6167652d69642f32373034303269393733414635313832333430423936422f696d6167652d64696d656e73696f6e732f363336783231303f763d7632" width="636" height="210" role="button" title="LN86_1-1594890878352.png" alt="LN86_1-1594890878352.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;and the second one, which is never exectued (callback vi):&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="LN86_2-1594890940008.png" style="width: 643px;"&gt;&lt;img src="https://ip1.i.lithium.com/58669af393942438a1e89a5705728c40a99f6008/68747470733a2f2f6e692e6c69746869756d2e636f6d2f74352f696d6167652f736572766572706167652f696d6167652d69642f32373034303369323741414341304236433337393046442f696d6167652d64696d656e73696f6e732f363433783138383f763d7632" width="643" height="188" role="button" title="LN86_2-1594890940008.png" alt="LN86_2-1594890940008.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It doesn't work even if I copy this code into the first vi. I always receive an error...&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thx in advance.&lt;/P&gt;</description>
    <pubDate>Thu, 16 Jul 2020 11:00:08 GMT</pubDate>
    <dc:creator>LN86</dc:creator>
    <dc:date>2020-07-16T11:00:08Z</dc:date>
    <item>
      <title>ActiveX, print command to IWebBrowser2</title>
      <link>https://ni.lithium.com/t5/LabVIEW/ActiveX-print-command-to-IWebBrowser2/m-p/4067882#M1168413</link>
      <description>&lt;P&gt;Hello together&lt;/P&gt;
&lt;P&gt;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 &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Setup: LabView 2019, 32-bit with Win7 64-bit computer.&lt;/P&gt;
&lt;P&gt;What I want to do:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Using active x to open a local stored html file by using the object "IWebBrowser2" --&amp;gt; Works fine&lt;/LI&gt;
&lt;LI&gt;Use the command "print file" with "do not prompt user" --&amp;gt; doesn't work&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;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.&lt;/P&gt;
&lt;P&gt;I know that I could use the "report generation" but after some tests, I would like to use the way with active x.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;First question - are there some negative points by using active x?&lt;/P&gt;
&lt;P&gt;Second question - could anybody help me, why my code doesn't work?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Someone had the same problem as I have, but even with his solution, it does not work:&amp;nbsp;&lt;A href="https://forums.ni.com/t5/LabVIEW/Print-file-via-ActiveX-and-it-is-not-found-always/td-p/1667298/page/2?profile.language=en&amp;amp;lang=en" target="_blank" rel="noopener"&gt;https://forums.ni.com/t5/LabVIEW/Print-file-via-ActiveX-and-it-is-not-found-always/td-p/1667298/page/2?profile.language=en&amp;amp;lang=en&amp;nbsp;&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;I analysied as well the code under find examples "browser" -&amp;gt; "ActiveX Event Callback for IE", but can't find my bug.&lt;/P&gt;
&lt;P&gt;Alll Vi's with html-file are attached.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;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...&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="LN86_0-1594886406520.png" style="width: 292px;"&gt;&lt;img src="https://ip1.i.lithium.com/93225ed38f4e99d8a54531d1ef08991ad3b1d5ea/68747470733a2f2f6e692e6c69746869756d2e636f6d2f74352f696d6167652f736572766572706167652f696d6167652d69642f32373033383869394536453631464331374242443745452f696d6167652d64696d656e73696f6e732f323932783234313f763d7632" width="292" height="241" role="button" title="LN86_0-1594886406520.png" alt="LN86_0-1594886406520.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So this is my first vi. Silent and Visible doesn't work, it opens always the internet explorer, but it open it:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="LN86_1-1594890878352.png" style="width: 636px;"&gt;&lt;img src="https://ip1.i.lithium.com/4f92426ee5745695cfef84e6d364a8e734efb6a7/68747470733a2f2f6e692e6c69746869756d2e636f6d2f74352f696d6167652f736572766572706167652f696d6167652d69642f32373034303269393733414635313832333430423936422f696d6167652d64696d656e73696f6e732f363336783231303f763d7632" width="636" height="210" role="button" title="LN86_1-1594890878352.png" alt="LN86_1-1594890878352.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;and the second one, which is never exectued (callback vi):&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="LN86_2-1594890940008.png" style="width: 643px;"&gt;&lt;img src="https://ip1.i.lithium.com/58669af393942438a1e89a5705728c40a99f6008/68747470733a2f2f6e692e6c69746869756d2e636f6d2f74352f696d6167652f736572766572706167652f696d6167652d69642f32373034303369323741414341304236433337393046442f696d6167652d64696d656e73696f6e732f363433783138383f763d7632" width="643" height="188" role="button" title="LN86_2-1594890940008.png" alt="LN86_2-1594890940008.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It doesn't work even if I copy this code into the first vi. I always receive an error...&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thx in advance.&lt;/P&gt;</description>
      <pubDate>Thu, 16 Jul 2020 11:00:08 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/ActiveX-print-command-to-IWebBrowser2/m-p/4067882#M1168413</guid>
      <dc:creator>LN86</dc:creator>
      <dc:date>2020-07-16T11:00:08Z</dc:date>
    </item>
    <item>
      <title>Re: ActiveX, print command to IWebBrowser2</title>
      <link>https://ni.lithium.com/t5/LabVIEW/ActiveX-print-command-to-IWebBrowser2/m-p/4067883#M1168414</link>
      <description>&lt;P&gt;By the way the error is:&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;"Error -2147221248 occurred at Trying to revoke a drop target that has not been registered&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;in IWebBrowser2PrintHtmlFile.vi&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;This error code is undefined. Undefined errors might occur for a number of reasons. For example, no one has provided a description for the code, or you might have wired a number that is not an error code to the error code input.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;Additionally, undefined error codes might occur because the error relates to a third-party object, such as the operating system or ActiveX. For these third-party errors, you might be able to obtain a description of the error by searching the Web for the error code (-2147221248) or for its hexadecimal representation (0x80040100).&lt;/EM&gt;&lt;EM&gt;"&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 16 Jul 2020 11:03:05 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/ActiveX-print-command-to-IWebBrowser2/m-p/4067883#M1168414</guid>
      <dc:creator>LN86</dc:creator>
      <dc:date>2020-07-16T11:03:05Z</dc:date>
    </item>
  </channel>
</rss>

