LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

reading from ms word

I'm getting closer now. Using the word.llb and excel examples I think I'm
learning a little. But not there yet. I still can't open up a document.
When I try to use a document invoke node to open a file it shows a selection
for inputting a filename, but it is not a string input it is purple like a
pathname type. Ok, that's fine but when I create a constant or a control on
it and type in the filename then what I typed disappears. It's not just
hidden it's gone. So the invoke node errors when I run it. Why doesn't it
let me input a filename?
0 Kudos
Message 1 of 3
(2,392 Views)
Actually, you have to input a string, as activeX needs that. You can use a constant or a control, but the control should have a value on it to work properly. Another option is to use the file dialog function, with a path to string transformation. If you have any problem, you can check for any activeX call into the Visual Basic for applications help, use the object browser and select a function call, it will say you the values you must use.
Hope this helps
0 Kudos
Message 2 of 3
(2,392 Views)
Something I'll add to Gorka's reply; you have to explicitly create the
string and type the filename into it- not make the string by creating a
constant for the filename input. The input is of type "Variant", and hence
when you create the constant you create a purple variant constant instead of
the pink string constant. As you've discovered, it's difficult typing valid
input into a variant constant- I don't even know if you can do it.


Adam Russell wrote in message
news:o9ry7.695$cy.61866@newsread2.prod.itd.earthlink.net...
> I'm getting closer now. Using the word.llb and excel examples I think I'm
> learning a little. But not there yet. I still can't open up a document.
> When I try to use a document invoke node to open a file i
t shows a
selection
> for inputting a filename, but it is not a string input it is purple like a
> pathname type. Ok, that's fine but when I create a constant or a control
on
> it and type in the filename then what I typed disappears. It's not just
> hidden it's gone. So the invoke node errors when I run it. Why doesn't
it
> let me input a filename?
>
>
0 Kudos
Message 3 of 3
(2,392 Views)