Developing an Application with the API

Sometimes you still need the low-level control provided by the API technique when working with VBA. For example, you might want better control over the precise formatting of the data than the SDK will provide or you might simply want to save the raw XML with greater ease than the SDK allows. The API technique is available to any VBA developer, but you have to be willing to pay the price of additional coding. That said, this method does provide the ultimate in application control.

Like the application in the "Developing an Application with the SDK" section, you need to provide a special reference to use the application in this section. In this case, however, you'll use one of the Microsoft XML references. Users of Office 2003 have access to version 5.0 of this DLL; users of older versions will need to use any version between 2.0 and 4.0 for their application. (Always use the newest version of the DLL on your machine.) To add this reference, use the Tools ^ References command to display the References dialog box. Locate the appropriate Microsoft XML library, check it, and click OK.

The example code in this section uses Microsoft XML version 4.0 for maximum compatibility. If you use a different version of the Microsoft XML library, you might have to change the names of some objects for that particular version.

The example in this section shows how to detect online events. Listing 7.3 demonstrates one technique for using the GetSellerEventsQ call. You'll find the complete source for this example in the \Chapter 07\Excel\API folder of the source code located on the Sybex Web site.

Was this article helpful?

0 0
Ebay PowerSeller

Ebay PowerSeller

The Definitive Guide to Becoming an eBay Powerseller guides you through the rules, giving lists of prohibited items, behaviors, and other landmines.

Get My Free Ebook


Post a comment