LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Word Find and Replace

Hi,

My name is Pol and I'm new in Labview. 

I'm making a labview project and I need to modify a word report. 

 

In order to do it, I'm using the VI "Word Finde and Replace" and it works correctly in all the document in exception of the header. This VI doesn't detect the header words and when I try to change the words that there are in the header the VI does not replace them. 

 

¿There are any posibility to modify the header information of a Word report with labview? 

 

Tnks!!!

0 Kudos
Message 1 of 4
(2,002 Views)

Can you show us some code? Is that VI from a toolkit?

0 Kudos
Message 2 of 4
(1,994 Views)

Hi,

 

This is the code I have.

 

polballara5_0-1575502830375.png

0 Kudos
Message 3 of 4
(1,991 Views)

The ActiveX function uses the range of the document, and that doesn't cover headers and footers.

 

You can save a copy of that function, and modify it. It won't be trivial...

 

From the document, get all sections (sections property). Use Count to iterate over all items. For each section, you can get the headers and footers. For each header and footer, get the range and use the find on it...

 

So, definitely not trivial. And also no guarantees, I haven't tested this... It does seem the way to go, and possible.

0 Kudos
Message 4 of 4
(1,923 Views)