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

# Documents オブジェクトの MoveById メソッド

このメソッドは、指定した識別子を持つドキュメントを、コレクション内の指定した位置に移動します。

## 構文

```vb Visual Basic .NET theme={null}
Sub MoveById( _
  Id As Integer, _
  NewPos As Integer _
)
```

```cpp C++ theme={null}
HRESULT MoveById(
  int Id,
  int NewPos
);
```

## パラメーター

**Id**

\[in] この変数には、移動するドキュメントの識別子が格納されます。識別子は、[**IDocument::Id**](https://docs.abbyy.com/ja/flexi-capture/sdk/api-reference/document.md) プロパティの値として取得してください。

**NewPos**

\[in] ドキュメントは、このインデックスを持つドキュメントの**前**に配置されます。1 から [**IDocuments::Count**](https://docs.abbyy.com/ja/flexi-capture/sdk/api-reference/documents.md) プロパティの値までの範囲で指定する必要があります。

## 戻り値

このメソッドには固有の戻り値はありません。[ABBYY FlexiCapture SDK 関数の標準の戻り値](https://docs.abbyy.com/ja/flexi-capture/sdk/api-reference/errorcodes.md)を返します。

## 関連項目

[**Documents**](https://docs.abbyy.com/ja/flexi-capture/sdk/api-reference/documents.md)
