이 매크로는 원하는 것을 정확하게 수행합니다. 사용 방법은 다음과 같습니다 (맨 아래에 스크린 샷 포함).
참고 :이 매크로는 각 각주 이동이 끝날 때 실행 취소를 비활성화하므로 원하는 작업을 정확하게 수행하지 않을 경우를 대비하여 문서를 백업하십시오! 3 행에서 4 행에서 마지막 행을 제거하여 실행 취소를 다시 활성화 할 수 있지만 매우 큰 문서가 있으면 권장하지 않습니다 !!
Office 2013에서이를 설정하려면 (위와 동일한 링크에서 Office 2013 용으로 편집했습니다) :
1) Alt + F11을 누르십시오
2) 메뉴 표시 줄 상단에서 삽입> 모듈을 클릭하십시오.
3) 메인 창에서 아래 매크로를 복사하여 붙여 넣습니다.
4) 속성 창에서 모듈 이름을 원하는 이름으로 바꾸고 모듈 이름을 변경하면 왼쪽 창의 이름으로 바꾸십시오.
5) Normal을 저장하고 에디터를 닫습니다
6) Alt + F8을 누르고 매크로를 선택한 다음 실행을 누릅니다.
매크로 (귀하의 예제처럼 작동하도록 편집했습니다). 색상 코드를 원하는 것으로 변경할 수 있습니다- 색상 의 10 진수 값을 원합니다- 기본적으로 검은 색입니다.
Sub foot2inline()
Dim oFeets As Footnotes
Dim oFoot As Footnote
Dim oRange As Range
Dim szFootNoteText As String
' Grabs the collection of FootNotes
Set oFeets = Word.ActiveDocument.Footnotes
' Iterates through each footnote
For Each oFoot In oFeets
szFootNoteText = oFoot.Range.Text
'Start search from beginning of document
Selection.HomeKey Unit:=wdStory
Selection.Find.ClearFormatting
With Selection.Find
.Text = "^f" ' Looks for all footnotes
.Forward = True
.Wrap = wdFindStop
End With
Selection.Find.Execute
' Delete the footnote
oFoot.Delete
'Insert the footnote text
'Here you do whatever format tickles your fancy
'The only thing you need to keep is the speech marks and 'szFootNotetext'
'Make sure anything you want to surround the citations is inside speech marks.
'For example = " (" + szFootNoteText + ") "
Selection.Text = " [" + szFootNoteText + "] "
'CHANGE COLOR HERE. Color code is below.
Selection.Font.Color = 0
'Disables undo to save memory on very large documents.
ActiveDocument.UndoClear
Next
End Sub
스크린 샷 :
매크로 설정 :
각주가있는 문서 :
매크로 사용 :
참조 시스템이있는 문서 :