Customizer's Guide > Working with ActiveX Controls > Running Arbortext Editor in an ActiveX Control > close Method
  
close Method
Closes any open document after first prompting to save any changes (if it was modified).
close( [, closeFlags] )
Parameters
intcloseFlags
[optional] Defaults to 0. A bitmask that specifies close options.
Constructed by ORing the bits from the following enumeration:
0x0001 - When closing the current document, suppress the prompt to save the current document.
0x0002 - After closing the current document, do not display even the façade document. Note that in this case the host window will show through the ActiveX control area, which might result in unexpected display results.
0x0004 - When closing the current document and a prompt is put up to save, suppress the option to Cancel.
This option is useful if the containing host window is closing in such a way that cannot be aborted or canceled. It enables users to save a document without giving them the impression that they can cancel the operation that is closing down their document.
Returns
None.
Throws
A COM error will be returned to the caller for the following case:
User canceled at the save prompt. In this case, returns an HRESULT value of 0x800704C7 which enables the caller to distinguish this case from other types of failures.
This represents a FACILITY of FACILITY_WIN32 and a WIN32 error code of ERROR_CANCELLED.
In general, it is very unlikely that this method will fail other than the Cancel case.
Related topics
Integrating Arbortext Editor with web pages