OnAppIsActiveDocumentNew Method

The OnAppIsActiveDocumentNew event handler method returns an indicator of whether the application represented by the ExpressAddin component has a currently active document which is a new document that has never before been saved. Once it has been determined that the currently active document is new, you can use event handler methods to interact with the active document.

The client application is responsible for implementing an OnAppIsActiveDocumentNew event handler for some of the supported FileNet Application Integration commands. This event handler method should return via the parameter list, a bool indicating whether the application's currently active document is a new document.

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


HRESULT __stdcall CEventHandler::OnAppIsActiveDocumentNew(VARIANT_BOOL *pIsActiveDocumentNew)
{
   // New document is not supported yet, so return false.
   *isActiveDocumentNew = VARIANT_FALSE;
   return S_OK;
}
Parameters
boolActiveNew - [out] A pointer to a VARIANT Boolean is returned, which indicates whether the active document is new. A value of VARIANT_TRUE indicates that the currently active document is new; otherwise VARIANT_FALSE is returned.
Return
The OnAppIsActiveDocumentNew event handler method should return an HRESULT value of S_OK when successful.
See Also
OnAppCloseActiveDocument Method
OnAppGetActiveDocumentPath Method
OnAppSaveNewActiveDocument Method