Select the product you need help with
INFO: Type Libraries for Office May Change with New ReleaseArticle ID: 224925 - View products that this article applies to. This article was previously published under Q224925 On This PageSUMMARY
Microsoft Office products may change from one release to the next.
Typically, the type library for an Office product will have the same functions that were present in the earlier product version, but some functions may have additions to the number of arguments. Therefore, if you use ClassWizard-generated wrapper classes for an Office object library with code written against an early version of the object library, you might receive the following compilation error:
error C2660: '(function)' : function does not take (n) parameters
MORE INFORMATION
To illustrate, one such function that has changed is the Microsoft Word 2000 Add method of the Documents object. If you've used the ClassWizard to generate class wrappers for the functions in the Microsoft Word 2000 type library and you use code that worked with Microsoft Word 97, you will receive the compile error previously described. The following describes how you can correct this problem. Note that although the case illustrated applies to code that specifically automates Word, the same information can be applied to the other Microsoft Office applications. With the Word 97 type library, you could use the following code to automate Word and start a new document:
Automating Multiple Versions of Office ApplicationsIf you intend to write MFC code that will automate multiple versions of a Microsoft Office application, you should use the ClassWizard to generate wrapper classes from the type library of the earliest version. For example, if you would like your Automation client to support both Microsoft Word 97 and 2000, use the Word 97 type library for your wrapper classes. Likewise, if you want your Automation client to support both Microsoft 2000 and 2002, use the Word 2000 type Library for your wrapper classes.REFERENCES
For more information on Office Automation, please visit the Microsoft Office
Development support site at:
http://support.microsoft.com/ofd
(http://support.microsoft.com/ofd)
PropertiesArticle ID: 224925 - Last Review: January 24, 2007 - Revision: 5.4 APPLIES TO
|


Back to the top








