LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Report Generation Toolkit, ActiveX Properties and Methods Missing

I would like to post my solution to a MS Office problem and present a question about what's going on.

 

We are updating all of our systems to newer versions of Windows and Microsoft Office.  After updating from many different versions/OS's to Windows 7 and Office 2016, older code stopped functioning properly with ActiveX calls in Microsoft Office.  I deploy all of my LabVIEW software as executables and distribute these EXE's where needed.

 

I have been using the Report Generation Toolkit for about 10 years now, to populate protected documents and inserting text into bookmark locations.  I dug down into the toolkit subVI's to find references to the Document and Application objects.  I then created a few VI's to deal with populating bookmark locations and other tasks related to bookmarks.  We also lock these template files so that they can not be altered using the Office password protections.  I dealt with property nodes and invoke nodes on those Office objects.  With Office 2016, by default, office would open certain files in 'Read-Only' mode.  This essentially stopped my code from manipulating word documents.  See the bottom of this post for the picture of the solution (it's silly).

 

Until exploring this issue I have been running LabVIEW 2017 (32-bit) with Office 2007.  I believe that before changing anything in my development system these ActiveX methods and properties had gone missing.  Perhaps this had to do with installing LV2017.  Originally I had installed both the 32 bit and the 64 bit environment.  I removed the 64 bit environment because I had not intended to develop for 64 bit just yet.  

 

Questions:

1)  Where did all of the property node and invoke node objects go?  When I started looking into this, I noticed immediately that any of the property/invoke nodes either in my own vi's or in the RGT vi's no longer have anything to choose from.  Existing VI's still function using these nodes, but I can not modify existing nodes.Missing Properties.jpg

 

Property Nodes Snippet.png

 

2) How can these VI's function if it seems that the underlying properties are no longer available?  Even though I can not select/change nodes, the code is still able to function without issue.  Using LV2017 32-bit environment with Word 2016 64-bit, my code functions without issue.

 

3)  How do I get access to the Office Application/Document objects in LV2017 (32-bit)?  To aid in working with the newer versions of Office, I have had 2016 (64-bit) installed on my development system.  I installed LV2017 (64-bit).  I reinstalled LV2017 (32-bit).  After doing this I expected to see the properties/methods back in the LabVIEW environment.  LV2017(64-bit) gives me access once again to all the properties and methods, but the 32 bit LV environment does not.

 

Solution to my initial problem:

There is an option in Word 2016 to open in 'Reading View' mode.  Disabling this allowed my older LabVIEW software to function again properly.

 

Reading View Options Dialogue.JPG

 

0 Kudos
Message 1 of 8
(3,614 Views)

There have been posts on this Forum about Office 2016 "breaking" the RGT, particularly with Excel.  Microsoft apparently added some "features" which require patching the RGT, making it specific for Office 2016.  [I'm using Office 2013, and have no problems with Windows 7 and Windows 10, 64-bit Office on 64-bit Windows with 32-bit LabVIEW].

 

I think if you search for "Excel 2016" (be sure to include the quotation marks, as that makes the search term "Excel 2016" instead of "Excel" and "2016" ...), you'll find the thread.

 

Bob Schor

 

 

0 Kudos
Message 2 of 8
(3,581 Views)

I have found a myriad of threads pertaining to Excel beginning with Excel 2013.  This seems to be where most of the problems pertaining to ActiveX began. I have been hunting through LabVIEW's forums and LavaG.org's forums and I have seen so many solutions that have to do with Excel specifically, but not to Office/ActiveX as a whole.  I've been through generic google searches and various microsoft forums.  I'm looking for more insight into what is going on.  From what I've been able to gather in the last few days:

 

-  64-bit versions of Office do not have ActiveX, yet already existing ActiveX vi's I've written still seem to be able to open and interact with Word...

-  After Installing LabVIEW 2017 64-bit (After updating office per the LV installation guidelines), the ActiveX properties reappear. but remain missing in the 32-bit version.

-  I've seen some more posts that mention (paraphrasing to my understanding) taking existing files and just moving them into the system32 folder in windows or something along those lines.  Other suggestions talk about removing/updating registry keys.  I have not tried any of these solutions yet, due to the fact that it seems that I can just continue on my way using LV2017 64-bit.  However, I have a need to retain and support my 32 bit older system applications and the ActiveX has just dissappeared in other versions of LabVIEW. -  

-  There seem to have been patches that have come out to address more specific issues with Excel and ActiveX objects.  Yet I'm afraid to start messing with these for fear of 'breaking' my machine and adding insult to injury.

 

When you call an object such as the ActiveX reference, how do you discover 'what' is being 'called'?  I see all sorts of objects when I try to link the automation refnum to an ActiveX class.  Where does this list come from?

 

In comparison to other deeper issues that I've been trying to learn about, I had to spend many, many hours scouring over the VISA standard to get a decent handle on what LabVIEW does behind the scene when invoking even a VISA control on the front panel.  There are just such basic things that continue to confuse me about programming in general, and I've been at this 'game' for about 20 years now.  I'm pretty proud of my ability to write and read code/write algorithms/ adapt to new languages/ yet there is so much that is still 'underneath' that I find it very difficult to find answers to.  It seems that information is either WAY too far above my head that I have no idea what people are talking about, or it's buried so far in a 200 page textbook for beginners that I'll never find it....but I digress.

0 Kudos
Message 3 of 8
(3,573 Views)

ActiveX (a now-deprecated Microsoft "standard") and VISA (which I just learned stands for Virtual Instrument Software Architecture, but does not originate with NI) are two entirely different things and ideas.  VISA pertains to (usually serial) devices (and usually "just works", in my limited experience), while ActiveX is ... well, ActiveX (and does whatever Microsoft allows it to do).

 

It is confusing (to me, at least) to think of these two different things in a Post dealing with the RGT and ActiveX.

 

Bob Schor

0 Kudos
Message 4 of 8
(3,568 Views)

Well, I didn't intend to suggest that the two were related.  I was basically trying to outline the frustration of understanding a HUGE thing at a low level without anything other than the internet to guide you by comparing it to something else I've needed to learn.   I'm hoping someone can help me understand what is going on rather than tell me to search for 'this thing' or 'that thing'.

 

Can you answer any of my ACTUAL questions or maybe a little nugget of insight?

 

The most interesting behaviour right now is that I can not create new nodes or open a reference to an ActiveX object, yet, the toolkit and any other vi's I've written still function on deployed machines as well as my development machine with the LabVIEW environment.  What is allowing it to function properly, yet not be able to access the underlying API objects/code?

0 Kudos
Message 5 of 8
(3,560 Views)

ActiveX is "not my thing".  I've used the RGT to do some interesting things with Excel, but have tried to avoid ActiveX as it is, as you have noted and noticed, not a solid, stable thing.  Sorry I can't be of more help to you.

 

Bob Schor

0 Kudos
Message 6 of 8
(3,550 Views)

@Andrew_F wrote:

3)  How do I get access to the Office Application/Document objects in LV2017 (32-bit)?  To aid in working with the newer versions of Office, I have had 2016 (64-bit) installed on my development system.  I installed LV2017 (64-bit).  I reinstalled LV2017 (32-bit).  After doing this I expected to see the properties/methods back in the LabVIEW environment.  LV2017(64-bit) gives me access once again to all the properties and methods, but the 32 bit LV environment does not.

I do have similar experiences, only solution so far: install the 32bit version of Office 2016. Smiley Sad

 

Regards, Jens

Kudos are welcome...
0 Kudos
Message 7 of 8
(3,539 Views)

Let me see if I can pull this back a little now that I have a fresh set of rested eyes...and thanks for responding and walking through this with me.  It's just overwhelming the amount of information that's out there...needle in a haystack.  And it's frustrating to me because I don't understand a lot of the fundamentals, so even if the answer is obvious to other people, there's still a learning curve I'm trying to climb.

 

For a sanity check I populated a 64-bit word document using the 32-bit LV2017 RGT and my own custom code.  It functioned perfectly.  Yet, I can't generate new code because all of the properties and methods are not available like the first picture I posted shows.  So, HOW did the code work?  Is it possible to have both 32-bit and 64-bit LV2017 on my development machine with the ActiveX properties and invoke nodes available?  And if it's NOT possible, why is this so?

 

Using LV 32 bit and office 32 bit is a workable solution to me, however I'm trying to understand this.  Where/how did LabVIEW know to access the methods/properties to invoke them at runtime?  How would I find out what 'library' or activeX object is being pointed to on my system?  Some posts seem to talk about rebuilding 32-bit activeX objects on a 64 bit machine...what do they mean by this (horribly paraphrased, I'm sure, because I don't get it)?

0 Kudos
Message 8 of 8
(3,531 Views)