> ## Documentation Index
> Fetch the complete documentation index at: https://docs.abbyy.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Documentを開く前

> On Activate Document は、FlexiCapture エディターでDocumentを開く前に実行されます。Documentが開かないようにするには、スクリプトで CanOpen パラメーターを false に設定します。

<div id="when-it-is-launched">
  ## 実行されるタイミング
</div>

このスクリプトは、タスクウィンドウでDocumentをアクティブにする前に実行されます (ダブルクリック、メニュー コマンドの使用など) 。

* **CanOpen.Value** プロパティが **true** に設定されている場合、スクリプトの実行後にDocumentがドキュメントエディターで開かれます。
* **CanOpen.Value** プロパティが **false** に設定されている場合、Documentは開かれません。

既定では、**CanOpen** パラメーターの値は **true** です。

<div id="parameters">
  ## パラメーター
</div>

| **Name**     | **型**                                                                   | **アクセス**  | **説明**                |
| ------------ | ----------------------------------------------------------------------- | --------- | --------------------- |
| CanOpen      | [IBoolean](/ja/flexi-capture/appendix/scripts-shell/iboolean)           | 読み取り/書き込み | Documentを開くかどうかを指定します |
| Context      | [ITaskWindow](/ja/flexi-capture/appendix/scripts-shell/itaskwindow)     | 読み取り/書き込み | タスク ウィンドウ             |
| DocumentItem | [IDocumentItem](/ja/flexi-capture/appendix/scripts-shell/idocumentitem) | 読み取り/書き込み | 処理中のDocument          |
