Excel, VBA

MS 워드에서 모든 하이퍼링크 제거하기 (VBA 사용)

Jack Moon 2018. 6. 26. 09:33

1. Alt-F11 을 눌러 VBA 창 실행

2. 삽입 > 모듈 , 모듈창이 뜨면 아래 코드를 그대로 붙여 놓고 매크로 실행( ) 클릭



Sub KillTheHyperlinks() 

' -----------------------------------------------

' Removes all hyperlinks from the document:

' Text to display is left intact

' -----------------------------------------------

With ThisDocument 

' Loop while there are hyperlinks afoot!

While .Hyperlinks.Count > 0 

.Hyperlinks(1).Delete 

Wend 

End With 

' Shut this off, don't need anymore popping up

Application.Options.AutoFormatAsYouTypeReplaceHyperlinks = False 

End Sub