LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

How to Open selected word file

Hi All
I want to open some word file from my hard disk and then save some data.
i have studied the example given in cvi examples but in that particular case the document is opened already means that there is no selection. so i want to select a file (word) and save some data and then quit from it.
also i want to know that in the cvi word report example the paragraph is written.from where that paragraph comes becaz in the .c file there is no such paragraph.
Thanks
SIA
0 Kudos
Message 1 of 3
(3,224 Views)
Hi,

Just have a Command Button on your UI. Under the EVENT_COMMIT for the command button you call the "FileSelectPopup" function which opens a browser to select the file. Then the file path is stored under the path which you can in turn use to open and write the data by the normal file operation commands.

In the example they are opening a file which already has the text and adding the other content based on the selection of controls on the UI. If you want to add any data, you can always open the file, write to it using the file operation commands with the data in strings and save it.

Regards,
Siddu
0 Kudos
Message 2 of 3
(3,222 Views)
Thnaks a lot it has worked.
SIA
0 Kudos
Message 3 of 3
(3,195 Views)