05-17-2011 02:18 PM
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 ...
05-18-2011 08:37 PM
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