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

# IUserAttachment

> IUserAttachment を使用すると、ABBYY FlexiCapture のスクリプトでユーザー添付ファイルの内容を扱えます。ファイルからロードし、サイズ変更やバイトの編集を行い、変更を保存し直せます。

<div id="what-it-does">
  ## 機能
</div>

このインターフェイスは、ユーザー添付ファイルの内容を操作するために使用します。このオブジェクトはバイト配列を表します。各バイトには、コレクション内のオブジェクトとしてアクセスできます。任意の位置のバイト値を変更できます。

<div id="methods">
  ## メソッド
</div>

| **定義**                         | **説明**                                                 |
| ------------------------------ | ------------------------------------------------------ |
| FromFile( fileName : string)   | 添付ファイルの内容を、指定したパスにあるファイルの内容で置き換えます。                    |
| SetSize( newSize : int) : bool | ファイルのサイズを変更します。サイズが指定値より小さいファイルは拡張され、大きいファイルは切り詰められます。 |
| ToFile( fileName : string)     | ファイルをハードディスクの指定したパスに保存します。                             |
| UploadAttachment( )            | 添付ファイルに加えた変更を保存します。                                    |

<div id="properties">
  ## プロパティ
</div>

| **名前**   | **型**  | **アクセス**  | **説明**                                                      |
| -------- | ------ | --------- | ----------------------------------------------------------- |
| AsString | string | 読み取り/書き込み | ファイルを 1 つの Unicode 文字列として表します。ファイルは Unicode 文字列として読み書きできます。 |
| Name     | string | 読み取り専用    | ファイル名                                                       |
