Word.RevisionType enum
リビジョンの種類を指定します。
注釈
使用元
例
// Link to full sample: https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/50-document/track-moved-text.yaml
// Reads and selects the text associated with a tracked move.
await Word.run(async (context) => {
const document: Word.Document = context.document;
const revisions: Word.RevisionCollection = document.revisions;
revisions.load("items/type");
await context.sync();
const movedFrom: Word.RevisionType = Word.RevisionType.movedFrom;
const movedTo: Word.RevisionType = Word.RevisionType.movedTo;
const movedRevision: Word.Revision | undefined = revisions.items.find(
(revision: Word.Revision) => revision.type === movedFrom || revision.type === movedTo
);
if (!movedRevision) {
console.log("Revision types found:", revisions.items.map((revision: Word.Revision) => revision.type));
console.warn("No tracked move was found. Move an entire paragraph as described in the task pane; moving a phrase may produce insertion and deletion revisions instead.");
return;
}
const movedRange: Word.Range = movedRevision.movedRange;
movedRange.load("text");
movedRange.select();
await context.sync();
console.log(`Moved revision range text: ${movedRange.text}`);
});
フィールド
| cellDeletion = "CellDeletion" | セル削除のリビジョン。 |
| cellInsertion = "CellInsertion" | セル挿入のリビジョン。 |
| cellMerge = "CellMerge" | セル結合のリビジョン。 |
| cellSplit = "CellSplit" | セル分割のリビジョン。 |
| conflict = "Conflict" | 競合のリビジョン。 |
| conflictDelete = "ConflictDelete" | 競合削除リビジョン。 |
| conflictInsert = "ConflictInsert" | 競合挿入リビジョン. |
| delete = "Delete" | Delete revision. |
| displayField = "DisplayField" | フィールドのリビジョンを表示します。 |
| insert = "Insert" | リビジョンを挿入する. |
| movedFrom = "MovedFrom" | リビジョンから移動しました。 |
| movedTo = "MovedTo" | 改訂版に移動しました。 |
| none = "None" | 変更なし |
| paragraphNumber = "ParagraphNumber" | 段落番号の改訂。 |
| paragraphProperty = "ParagraphProperty" | 段落プロパティのリビジョン。 |
| property = "Property" | プロパティのリビジョン。 |
| reconcile = "Reconcile" | リビジョンを調整します。 |
| replace = "Replace" | リビジョンを置き換える。 |
| sectionProperty = "SectionProperty" | セクション プロパティのリビジョン。 |
| style = "Style" | スタイルのリビジョン。 |
| styleDefinition = "StyleDefinition" | スタイル定義の改訂。 |
| tableProperty = "TableProperty" | テーブル プロパティのリビジョン。 |