Copy/paste wikipedia text comes up with reference numbers, [edit]? Use this Word macro to clean up.I created a macro that will delete unnecessary text like
[1],
[edit],
[citation needed] when pasting text from wikipedia. The macro does the trick for English and Greek wikipedia. Feel free to add your own language bits.
Sub cleanwikipedia()
'
' wikipedia clean up references Macro
' Macro by Spiros Doikas - see https://www.translatum.gr/forum/index.php?topic=171118.0
'
With Selection.Find
.Text = "[citation needed]"
.Replacement.Text = ""
.Forward = True
.Wrap = wdFindContinue
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
.Execute Replace:=wdReplaceAll
.Text = "[^#]"
.Replacement.Text = ""
.MatchWholeWord = False
.Execute Replace:=wdReplaceAll
.Text = "[^#^#]"
.Replacement.Text = ""
.MatchWholeWord = False
.Execute Replace:=wdReplaceAll
.Text = "[edit]"
.Replacement.Text = ""
.MatchWholeWord = False
.Execute Replace:=wdReplaceAll
.Text = "[Επεξεργασία]"
.Replacement.Text = ""
.MatchWholeWord = False
.Execute Replace:=wdReplaceAll
.Text = "[εκκρεμεί παραπομπή]"
.Replacement.Text = ""
.MatchWholeWord = False
.Execute Replace:=wdReplaceAll
End With
End Sub
See also:
How to install a macro in Word