> ## 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.

# IDocumentViewerEvents Interface の OnSendToPages メソッド

> Windows 上の ABBYY FineReader Engine Visual Components における IDocumentViewerEvents Interface の OnSendToPages メソッド — このメソッドはクライアント側で実装されます。

このメソッドはクライアント側で実装されます。ABBYY FineReader Engine が認識済みのページを [Document Viewer](/ja/fine-reader/engine/visual-components-reference/documentviewer) から外部アプリケーションへ送信する際に呼び出されます。次のいずれかのコマンドが呼び出されると、この処理が実行されます。

* [MI\_SendToAcrobat](/ja/fine-reader/engine/visual-components-reference/documentviewer/document-viewer-commands#mi_sendtoacrobat)
* [MI\_SendToClipboard](/ja/fine-reader/engine/visual-components-reference/documentviewer/document-viewer-commands#mi_sendtoclipboard)
* [MI\_SendToMSExcel](/ja/fine-reader/engine/visual-components-reference/documentviewer/document-viewer-commands#mi_sendtomsexcel)
* [MI\_SendToMSWord](/ja/fine-reader/engine/visual-components-reference/documentviewer/document-viewer-commands#mi_sendtomsword)
* [MI\_SendToOpenOffice](/ja/fine-reader/engine/visual-components-reference/documentviewer/document-viewer-commands#mi_sendtoopenoffice)
* [MI\_SendToPowerPoint](/ja/fine-reader/engine/visual-components-reference/documentviewer/document-viewer-commands#mi_sendtopowerpoint)
* [MI\_SendToWebBrowser](/ja/fine-reader/engine/visual-components-reference/documentviewer/document-viewer-commands#mi_sendtowebbrowser)
* [MI\_SendToWordPerfect](/ja/fine-reader/engine/visual-components-reference/documentviewer/document-viewer-commands#mi_sendtowordperfect)
* [MI\_SendToWordPro](/ja/fine-reader/engine/visual-components-reference/documentviewer/document-viewer-commands#mi_sendtowordpro)

これらのコマンドは、コンテキストメニュー内の対応する項目から、または IDocumentViewer::Commands の [DoCommand](/ja/fine-reader/engine/visual-components-reference/supplementary-objects/commands/docommand-method) メソッドを使用して呼び出すことができます。詳細については、[Document Viewer Commands](/ja/fine-reader/engine/visual-components-reference/documentviewer/document-viewer-commands) の一覧を参照してください。

このメソッドは、ページの送信先アプリケーションに関する情報とエクスポートのパラメーターをクライアントに渡します。また、このメソッドを使用して操作をキャンセルすることもできます。

<div id="syntax">
  ## 構文
</div>

<div id="c">
  ### C++
</div>

```cpp theme={null}
HRESULT OnSendToPages(
  SendToDestinationEnum Destination,
  IUnknown*             ExportParams,
  VARIANT_BOOL*         Cancel
);
```

### C\#

```csharp theme={null}
void OnSendToPages(
  SendToDestinationEnum Destination,
  object                ExportParams,
  out bool              Cancel
);
```

<div id="visual-basic-net">
  ### Visual Basic .NET
</div>

```vb theme={null}
Sub OnSendToPages(
  Destination As SendToDestinationEnum, _
  ExportParams As Object, _
  ByRef Cancel As Boolean
)
```

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

Destination

\[in] 認識されたページの送信先となるアプリケーションを指定します。[SendToDestinationEnum](/ja/fine-reader/engine/visual-components-reference/enumerations/sendtodestinationenum) 定数の説明を参照してください。

ExportParams

\[in] 送信先アプリケーションに対応する型のエクスポート パラメーター オブジェクトを指定します。たとえば、ページの送信先が Microsoft Word の場合は、[RTFExportParams](/ja/fine-reader/engine/api-reference/parameter-objects/export-parameters/rtfexportparams) オブジェクトを指定します。

Cancel

\[out] 処理を中止する場合は、この変数を TRUE に設定できます。この場合、ページは送信されません。

<div id="return-values">
  ## 戻り値
</div>

\[C++ のみ] このメソッドの戻り値が S\_OK 以外の場合、クライアント側でエラーが発生したことを示します。この場合、Cancel パラメーターの値は無視されます。

<div id="remarks">
  ## 注記
</div>

このメソッドのクライアント実装では、メソッド内でスローされるすべての例外を必ず捕捉して処理し、どのような例外もメソッドの外部に伝播させないようにする必要があります。例外がメソッドの外部に伝播すると、予期しない結果 (プログラムの終了など) を招くおそれがあります。

<div id="see-also">
  ## 関連項目
</div>

[IDocumentViewerEvents](/ja/fine-reader/engine/visual-components-reference/idocumentviewerevents)
