10-12-2006 09:40 PM
10-13-2006
01:03 PM
- last edited on
11-06-2025
12:57 PM
by
Content Cleaner
Howdy Menchar,
The Microsoft Word shipping examples that come with LabWindows/CVI are built using the Microsoft Word 2000 Automation Server (9.0) which at the time didn't expose the line breaks option for the SaveAs method. However, the Microsoft Word 2003 (11.0) object model documentation shows that the new SaveAs method does support this feature (Refer to the SaveAs Method.jpg attachment which is a snapshot taken from the help file VBAWD10.CHM located at C:\Program Files\Microsoft Office\OFFICE11\1033\. Find more information about object model documentation at How to find and use Office object model documentation).
I then went back into LabWindows/CVI and created a new ActiveX controller for Microsoft Word 2003 by using the ActiveX Controller Wizard. After creating this, I verified that the new SaveAs method for a Document object included this new feature. See the differences between the function panels for Word 2000 and 2003 in the attachments entitled Microsoft Word 9.0.jpg and Microsoft Word 11.0.jpg. Notice there is some additional fields including one for line breaks.
Hope this helps!
Best Regards,
10-13-2006 01:15 PM
10-13-2006 01:19 PM - edited 10-13-2006 01:19 PM
Hi Menchar,
To ensure compatibility, you want to make sure that when you create the Microsoft Word 2003 ActiveX controller, you use the same instrument prefix and the same Compatibility Options. You will see these options when you use the wizard.
Best Regards,
Message Edited by Jonathan N on 10-13-2006 01:20 PM
10-14-2006 04:50 PM
10-16-2006 08:15 AM
Hi menchar,
I definitely agree with you that it can sometimes be "stressful" to convert back and forth between ActiveX and C data types. You probably already found this out, but all the ActiveX conversion functions are located in the ActiveX Library located in the Library Tree.
I would recommend taking a look at the Word2000demo shipping example that demonstrates some more Word automation and the usage of some more conversion function. In regards to you being able to save in a different located, notice our Save button and its callback function. We pop up a dialog asking for a file name and location. We then pass that onto Word's SaveAs method for a filename. This might help you out.
If you can think of any better way to make ActiveX and C data type conversion easier for the user, I would definitely submit a product suggestion (Goto www.ni.com >> Contact NI >> Product Feedback)
Best Regards,
10-16-2006
09:10 AM
- last edited on
11-06-2025
12:57 PM
by
Content Cleaner
Howdy menchar,
I would also recommend taking a look at the tutorial entitled LabWindows/CVI ActiveX Controller For Visual Basic 6.0 Users.
Best Regards,
10-16-2006 10:57 AM