Office.AddBindingFromSelectionOptions interface
作成されるバインドを識別するためのオプションを提供します。
注釈
使用元
例
// Link to full sample: https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/03-bindings/manage-bindings.yaml
// Creates a text binding from the current selection.
const options: Office.AddBindingFromSelectionOptions = { id: bindingId };
Office.context.document.bindings.addFromSelectionAsync(
Office.BindingType.Text,
options,
(asyncResult) => {
if (asyncResult.status === Office.AsyncResultStatus.Failed) {
console.error(asyncResult.error.message);
return;
}
console.log(`Created binding "${asyncResult.value.id}" of type "${asyncResult.value.type}".`);
}
);
プロパティ
| async |
コールバックに渡される AsyncResult オブジェクトの asyncContext プロパティで変更されずに返される、任意の型のユーザー定義項目。 |
| columns | バインドに関係する列の名前。 |
| id | バインドの一意の ID。 指定されていない場合は自動生成されます。 |
プロパティの詳細
asyncContext
コールバックに渡される AsyncResult オブジェクトの asyncContext プロパティで変更されずに返される、任意の型のユーザー定義項目。
asyncContext?: any
プロパティ値
any
columns
バインドに関係する列の名前。
columns?: string[]
プロパティ値
string[]
id
バインドの一意の ID。 指定されていない場合は自動生成されます。
id?: string
プロパティ値
string