object = wnd.accObj(objID, strClass, wndID);
If the necessary support is installed (see Accessibility) and if the application is an Accessibility server, then this property will return an object which allows greater control over the current UI element. Its interface depends on the objID specified. Note: you don't need to use this property if you only want an IAccessible interface: you can call accessibility methods and properties directly on any Q1 wrapper.
This property is useful for retrieving custom accessibility or native interfaces, such as those of MS Office applications. Here's an example of the types of objects returned by some applications when you specify consts.OBJID_NATIVEOM as the object ID:
| Window class | Object returned |
|---|---|
| _WwG (Word) | Window |
| EXCEL7 (Excel) | Window |
| paneClassDC (PowerPoint) | DocumentWindow |
| MsoCommandBar | CommandBar |
| RichEdit20W | ITextDocument |
(Please refer to the appropriate documentation for the list of methods for the above objects.)
// Obtain the native interface for a richedit var document = app.accObj(consts.OBJID_NATIVEOM, "RichEdit20W"); document.Selection.Font.Bold = true; document.Selection.Text = "This was done through an ITextDocument interface";