I want to read a read Word document, find any text that is marked with any color other than black, and delete it. How to find text color in VBA?
Try using the following code:
Sub DeleteNonBlack() Dim Wrd As Range For Each Wrd In ActiveDocument.Words If Wrd.Font.Color<>wdColorBlack and wrd.Font.Color<>wdColorAutomatic Then Wrd.Delete end if Next Wrd End Sub
NTN
Source: https://habr.com/ru/post/1787328/More articles:HTTPclient POST with problematic website - javaКак написать unit test для небезопасной коллекции потоков - multithreadingSmart Pointers, Forward Declaration and C4150 - c ++Closing attribute values in HTML and CSS - htmlBit order in bit streams - javaUIAlertview with vertical buttons - iphoneКак реализовать ProgressDialog, пока Activity запрашивает SoapObject из веб-службы? - android2 UIAlertView with 3 buttons? - iphoneRemoving object deserialization with new members - c #C # Get control at a specific position in the form - c #All Articles