Syntax
| lValue = AI.ConversationCount
|
|---|---|
Type
| Long
|
Access
| read-only
|
Description
| Returns the number of conversation handles that are currently open on the AI object. The counter is incremented by NewConversation (and by Ask when it creates an implicit handle), and decremented by CloseHandle. CloseAll resets it to zero.
Use this property to detect leaked handles in long-running macros or in server-side hosts such as MacroHandler. A macro that processes a batch of records and opens a fresh conversation per record should see ConversationCount return to its baseline after each iteration; a steadily growing value indicates that CloseHandle is being skipped on some code path.
|
See Also
| |
Example
| Sub Main |