Behavior of GETOBJECT() with Excel and Word for WindowsLast reviewed: April 30, 1996Article ID: Q128994 |
The information in this article applies to:
SUMMARYThis article describes how the behavior of the GETOBJECT() function is dependent on the OLE Server that processes the request. It focuses on the differences between Excel and WordBasic as OLE automation servers.
MORE INFORMATIONOLE and OLE automation are two primary means of sharing information. As an OLE client, Visual FoxPro can control external data from other applications. As OLE automation servers, Microsoft Word (through WordBasic) and Excel support incoming OLE requests. Because OLE is still evolving, OLE automation servers do not support all requests the same way. For example, Word for Windows, version 6.0c and Excel version 5.0 do not identically support the request made by the GETOBJECT() function. The GETOBJECT() function retrieves an OLE Automation object and creates a reference to that object. It has two arguments, a file name and a class name. For example, to retrieve and create a reference to an Excel spreadsheet, you can use this syntax:
cBudget=GETOBJECT('C:\Excel\Mysheet.XLS ','Excel.Application')Passing an empty string as the first argument to the GETOBJECT() function results in different behaviors with Excel version 5.0 or Word as OLE automation servers:
REFERENCESFor a list of OLE automation verbs supported by Excel version 5.0, please see the Excel Object Browser. For a list of WordBasic OLE automation verbs, please see the "Using Word Basic" guide. For more information about Microsoft OLE automation servers, please see the Office Developer's Kit.
|
Additional reference words: 3.00 VFoxWin
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |