LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

activeX controller for MS-word not working

 used activeX controller wizard to control MS-Word  and successfully created it with 'per property' compatibilty options.  i just simply tried to launch word application using function(Word_NewApplication (NULL, 1, LOCALE_NEUTRAL, 0, &appHandle);) it doesnt works for me inspite of returning return error value of '0' means success.   do i need something before using this function/API.

 

Please kindly help me in this regard...... i am new to this....please provide any helpful manual/tutorial for activeX ...

0 Kudos
Message 1 of 2
(3,029 Views)

Hi faisaldin,

 

If you look at your Task Manager after running the code you have listed in your post, you should see an instance of WINWORD.EXE running as a process.  This is because you are, in fact, opening a new instance of Word, but you must set it to be visible in order to see it.  This can be done with the Word_ApplicationSetVisible function.  For instance, your code would look something like the following:

 

Word_NewApplication (NULL, 1, LOCALE_NEUTRAL, 0, &appHandle);

Word_ApplicationSetVisible (appHandle, NULL, VTRUE);

 

This will make Microsoft Word visible for you.  Also, for more information regarding ActiveX controls in LabWindows/CVI, please look at the link I have posted below.  I hope this helps, faisaldin!

 

Programming with ActiveX Controls

Taylor G.
Product Support Engineer
National Instruments
www.ni.com/support
0 Kudos
Message 2 of 2
(3,013 Views)