LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

MS Word: fields reading

Solved!
Go to solution

Hi all,

 

I'm trying to read fields from existing MS Word documents in order to import some data into Labview (I'm currently using 8.0.1 Professional).

Using the "Word Insert Field" VI I been able to insert a new field, but looking at the code I'm not able to modify it in order to change the function from "insert" to "read"...Smiley Happy

 

Please help me!

Many thanks.

 

 

0 Kudos
Message 1 of 10
(5,122 Views)

Hello sciawatt,

 

I am sending you an example where you can see an implementation of how to read a specific sell of Word in LabVIEW.

Can you check it out and tell me if it helps??

Thank you!

 

 

Antonios
Message 2 of 10
(5,085 Views)

Dear A.V.

 

Many thanks for the help.

Unfortunately I cannot open your VI as my Labview version is 8.0.1, sorry...

But, if I understand correctly you are talking about cells, my goal is to read word fields (look at the modified docx file).

Thanks again.

 

 

 

 

0 Kudos
Message 3 of 10
(5,080 Views)
Solution
Accepted by topic author sciawatt

... at the end I figured out that what I really need is to retrieve bookmarks, not fields! So, modifying the VI called "Word_Get_Bookmarks_from_Template.vi" from _wordsub.llb I been able to achive my purpose.

Thanks

0 Kudos
Message 4 of 10
(5,060 Views)

Hi sciawatt,

 

I realise this thread was some time ago, but if you can remember could you give me some guidance as to how you modified the VI to obtain the text from the bookmark?

 

Thanks

 

0 Kudos
Message 5 of 10
(4,812 Views)

Yes, it was long time ago and for this application I've used different approach; anyhow I've found the VI I've modified for testing purpouse, hope this helps.

0 Kudos
Message 6 of 10
(4,805 Views)

Hey sciawatt,

 

That has worked great, thanks very much for your help.

 

Much appreciated...

 

 

0 Kudos
Message 7 of 10
(4,783 Views)

I am also attempting to programmatically read information from Microsoft Word using LabVIEW.   I can sucessfully read Word text and Word Table data using active X, but I want to read an Excel table (sheet?) data that is embedded into a Word table.   I don't know if the embedded Excel sheet is accessed directly from the Word table or if it is access using a container property.  Any idea which property(ies) I need to access in order to read embedded Excel tables?  I have attached a sample Word document with embedded Excel tables.

 

many thanks

0 Kudos
Message 8 of 10
(4,723 Views)

I was searching various non-LabVIEW forums and found some examples discussing embedded Excel in a Microsoft Word document.  In the code examples, I noticed they each included the term "InlineShapes".   I was able to find this property in LabVIEW and then wire it to a "count" property.   Then I tried to open each of two versions of my previously attached Word document, one with 3 embedded Excel tables and one with 4 embedded tables.  The "Count" property indicator reflected 3 "InlineShapes" and 4 "InlineShapes", corresponding to the Word document I opened with LabVIEW.   So I think I am on the right track.   Let me know if anyone wishes to collaborate on this topic and I will post my code.  I have LabVIEW 7 and LabVIEW 8.6 working versions.   I will be receiving LabVIEW 2013 today so I will eventually recompile to 2013.   But I think any version of LabVIEW after 8.6 through 2013 should be able to open the 8.6 verison without any need to edit the code.  A screenshot of the "InlineShapes" property is attached.

 

thanks

0 Kudos
Message 9 of 10
(4,704 Views)

I have a later version of LABVEIW, so could you send screenshots of program?

0 Kudos
Message 10 of 10
(4,246 Views)