다음의 VBA 코드를 사용하면 현재 문서의 모든 주석을 각주 또는 미주로 신속하게 변환할 수 있습니다。 다음 단계를 따르세요。
1. 각주 또는 미주로 변환할 주석이 포함된 문서를 엽니다。 그런 다음Alt+F11키를 눌러Microsoft Visual Basic for Applications창을 엽니다。
2. Microsoft Visual Basic for Applications창에서삽입>모듈을 클릭한 후 아래의 VBA 코드를 모듈 창에 복사합니다。
VBA 코드: 주석을 각주로 변환하기:
Sub ConvertCommentsToFootnotes()
Dim xComm As Comment
Dim xCommRange As Range
Dim xDoc As Document
Application.ScreenUpdating = False
Set xDoc = ActiveDocument
For Each xComm In xDoc.Comments
Set xCommRange = xComm.Range
xDoc.Footnotes.Add xComm.Scope, , xCommRange.Text
xComm.Delete
Next
Application.ScreenUpdating = True
End Sub
VBA 코드: 주석을 미주로 변환하기:
Sub ConvertCommentsToEndnotes()
Dim xComm As Comment
Dim xCommRange As Range
Dim xDoc As Document
Application.ScreenUpdating = False
Set xDoc = ActiveDocument
For Each xComm In xDoc.Comments
Set xCommRange = xComm.Range
xDoc.Endnotes.Add xComm.Scope, , xCommRange.Text
xComm.Delete
Next
Application.ScreenUpdating = True
End Sub
3. F5키를 눌러 코드를 실행합니다。
그러면 현재 문서의 모든 주석이 적용한 VBA 코드에 따라 즉시 각주 또는 미주로 변환됩니다。