Hi,
willst Du das in Word VBA oder in einer anderen Technologie wie .NET, .NET Core, ... machen?
Falls letzteres, schau dir mal Syncfusion DocIO an. (Gibt es auch in einer - auch kommerziell nutzbaren - kostenlosen Community Edition).
https://help.syncfusion.com/cr/file-formats/Syncfusion.DocIO.Base~Syncfusion.DocIO.DLS.WCharacterFormat.html
Gruß, Stefan
Microsoft MVP - Visual Developer ASP/ASP.NET (2001-2018)
https://www.asp-solutions.de/ - IT Beratung, Softwareentwicklung, Remotesupport