OnAppExistsActiveDocument Method

The client application is responsible for implementing an OnAppExistsActiveDocument event handler for some of the supported FileNet Application Integration commands. This event handler method should return a bool to the ExpressAddin, via the parameter list, that indicates whether the application has a currently active document.

Example
The following fragment is taken from the Add-In Sample Application.


HRESULT __stdcall CEventHandler::OnAppExistsActiveDocument(VARIANT_BOOL *pExistsActiveDocument)
{
   // Query the document object to determine if there is an active document.
   if( m_pDocument->ExistsActiveDocument() )
   {
      *pExistsActiveDocument = VARIANT_TRUE;
   }
   else
   {
      *pExistsActiveDocument = VARIANT_FALSE;
   }
   return S_OK;
}
Parameters
boolActiveExists - [out] A pointer to a VARIANT Boolean is returned, which indicates whether the application has an active document. A value of VARIANT_TRUE indicates that the application has an active document; otherwise VARIANT_FALSE is returned.
Return
The OnAppExistsActiveDocument event handler method should return an HRESULT value of S_OK when successful.
See Also
OnAppCloseActiveDocument Method
OnAppGetActiveDocumentPath Method
OnAppInsertHyperlink Method
OnAppIsActiveDocumentModified Method
OnAppIsActiveDocumentNew Method
OnAppSaveModifiedActiveDocument Method
OnAppSaveNewActiveDocument Method