Rookie

漫游指南-1 的世界

流浪在大理的斜杠青年

Use VB to cancel Word problem image hyperlinks

0X001 Introduction#

Yesterday I wanted to save the article to upload to the internal WIKI, so I used ctrl+P to save it locally, but when copying, it still called the hyperlinks. I reluctantly thought of the Word document (didn't want to install any plugins because they are unsafe). I found that in Word, right-clicking the image only allows me to remove one hyperlink at a time, which I found too troublesome.
In desperation, I used VB to handle the hyperlink process as follows:

0X002 Start#

  1. Open Word, press Alt+F11 in the Word document, and paste the following code:
 Sub   RemoveLink()   
  For   a   =   1   To   ThisDocument.Hyperlinks.Count   
          ThisDocument.Hyperlinks(1).Delete   
  Next   
  End   Sub

Then press F5 -> select Run -> close the page -> Word is done.

Loading...
Ownership of this post data is guaranteed by blockchain and smart contracts to the creator alone.