Skip to content

Instantly share code, notes, and snippets.

@masanobuimai
Created June 8, 2020 05:11
Show Gist options
  • Save masanobuimai/37cceb4258046d0e7964d3c6927b50f2 to your computer and use it in GitHub Desktop.
Save masanobuimai/37cceb4258046d0e7964d3c6927b50f2 to your computer and use it in GitHub Desktop.
削除以外の変更履歴を一括承諾する
Sub Macro1()
' 挿入/変更/削除以外の変更履歴を一括承諾する
' https://docs.microsoft.com/ja-jp/office/vba/api/word.wdrevisiontype
For Each myRev In ActiveDocument.Revisions
myType = myRev.Type
Select Case myType
Case _
wdRevisionDisplayField, _
wdRevisionParagraphNumber, _
wdRevisionParagraphProperty, _
wdRevisionProperty, _
wdRevisionSectionProperty, _
wdRevisionStyle, _
wdRevisionStyleDefinition, _
wdRevisionTableProperty
myRev.Accept
End Select
Next
End Sub
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment