How do I remove Nikkud (vowel marks) from a Word 2016 document?
I am working on a commentary on Ethics of the Fathers and I want readers to be able to read sources I'm quoting in their original Hebrew. I am getting most of my sources from sefaria.org and unfortunately many of the sources have Nekudos (vowel marks) while most of them don't. For consistency and professionalism I want all the sources to not contain Nekudos.
For example this line: מֹשֶׁה קִבֵּל תּוֹרָה מִסִּינַי. אוֹמֵר אֲנִי, לְפִי שֶׁמַּסֶּכֶת זוֹ should be משה קבל תורה מסיני. אומר אני שמסכת זו. I expect to need to do this hundreds of times so I need something fast. Somebody once made me a document with Macros to do this but it isn't working on Word 2016. Does anyone else have an efficient way to do it? Thank you so much.
This post was sourced from https://writers.stackexchange.com/q/32470. It is licensed under CC BY-SA 3.0.
1 answer
I was looking for the exact same thing. Dug around and found ways to do it outside Word, but really wanted to do this without leaving Word. Did some more reading and discovered the key is to run a find and replace, searching for the vowel characters in the Hebrew Unicode block. I wanted to keep maqqef and sof pasuq, so I had to use three separate ranges (if you don't want those characters, you can simplify this to one search for the whole range 1425-1479). The results are below. If you select text and run the macro, it will only apply to the selection. If you don't have a selection, it will run to end of document.
Sub HebrewDevocalizer()
With Selection.Find
.ClearFormatting
.Replacement.ClearFormatting
.Text = "[" & ChrW(1425) & "-" & ChrW(1469) & "]"
.Replacement.Text = ""
.Forward = True
.Wrap = wdFindStop
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchKashida = False
.MatchDiacritics = False
.MatchAlefHamza = False
.MatchControl = False
.MatchAllWordForms = False
.MatchSoundsLike = False
.MatchWildcards = True
End With
Selection.Find.Execute Replace:=wdReplaceAll
With Selection.Find
.ClearFormatting
.Replacement.ClearFormatting
.Text = "[" & ChrW(1471) & "-" & ChrW(1474) & "]"
.Replacement.Text = ""
.Forward = True
.Wrap = wdFindStop
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchKashida = False
.MatchDiacritics = False
.MatchAlefHamza = False
.MatchControl = False
.MatchAllWordForms = False
.MatchSoundsLike = False
.MatchWildcards = True
End With
Selection.Find.Execute Replace:=wdReplaceAll
With Selection.Find
.ClearFormatting
.Replacement.ClearFormatting
.Text = "[" & ChrW(1476) & "-" & ChrW(1479) & "]"
.Replacement.Text = ""
.Forward = True
.Wrap = wdFindStop
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchKashida = False
.MatchDiacritics = False
.MatchAlefHamza = False
.MatchControl = False
.MatchAllWordForms = False
.MatchSoundsLike = False
.MatchWildcards = True
End With
Selection.Find.Execute Replace:=wdReplaceAll
End Sub
This post was sourced from https://writers.stackexchange.com/a/36945. It is licensed under CC BY-SA 3.0.
0 comment threads