LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Invoke Node causes error in VI

The attached VI is one of numerous VIs in an application that I "inherited".  I am attempting to rebuild the application to incorporate some changes I have made.  This VI has an error, which indicates that there is a bad or unwired terminal at the Invoke Node for the PrintOut method.  According to the Help system, all of the unwired parameters for this node are optional, so the node appears to be wired correctly.  What am I missing?  Thanks.
0 Kudos
Message 1 of 8
(2,816 Views)

You forgot to attach a VI.  If you attach a VI, I can probably help you figure out what the problem is.

-D

0 Kudos
Message 2 of 8
(2,810 Views)
OK,  here is the VI.  It looks like the attachment disappears if you preview the post before submitting it. 
0 Kudos
Message 3 of 8
(2,797 Views)

Hello,

Thanks for attaching the VI.  I believe the preview -> lost attachment issue has already been reported to the admins for this discussion forum.

As for your VI, I'm guessing this problem is happening because you are running a different version of Office than the computer on which this application was originally developed.  On the PrintOut invoke node, try selecting another method in the method list.  Then try selecting "PrintOut" again.  This should re-link the method to the "PrintOut" method specific to the Word version on your computer, and you should be fine.  By the way, the VI opens just fine (no broken run arrow) on my machine, and I'm running Office XP.

Let me know if this solves the problem.  Oh yeah, here's a tip.  I noticed that in this code, there is a Boolean constant wired to the "Close" method, but it's wired into a "To Variant" function to convert it to a variant.  This explicit conversion is not necessary...for any ActiveX property or invoke node that takes variant inputs, you can just wire the native LabVIEW type directly into the input (without an explicit conversion) and it will work fine...this should save you some time as you write new VIs, or edit this set of VIs you inherited.

Good luck,
-D

0 Kudos
Message 4 of 8
(2,789 Views)

Hello, I have developed a LV to control MS-Word using ActiveX on a PC with MS-Word version 2000.  Once it is compiled I am trying to run on a PC with MS-Word 2003!!! I understand the problem...is there any way to over come this issue!! Somehow dynamically detect and adapt or copy certain (DLL or some other) files to LV development machine? Thanks.

0 Kudos
Message 5 of 8
(2,375 Views)

Did you see the date when it is posted do not Hijack a thread (its adviced for a long time and still continues). If you have any issue start a new thread and also a take a look at the Quick introduction

-----

The best solution is the one you find it by yourself
0 Kudos
Message 6 of 8
(2,366 Views)

Hello,

 

See if you can manipulate this sample code to achieve your goal.

 

http://zone.ni.com/devzone/cda/epd/p/id/1546

 

Thank you,

 

Joel C

Applications Engineer

National Instruments

 

0 Kudos
Message 7 of 8
(2,325 Views)

Hi Joel,

 

Thanks for looking in to this.  The code you've pointed out shows the version of the MS office.  It looks like I have to develp the LV code in a machine with same version of MS office as in the machine I want to run on!!

 

Ara

0 Kudos
Message 8 of 8
(2,308 Views)