Prikaz jedne poruke
Stara 26.6.2021, 19:18   #4
voodoo_
V.I.P. GNU/Linux
 
Avatar korisnika voodoo_
 
Član od: 1.11.2005.
Poruke: 11.163
Zahvalnice: 2.081
Zahvaljeno 4.922 puta na 2.858 poruka
Određen forumom Re: Word i brojanje hajlajtovanih reči?

Nabudžio sam neki makro koristeći primere sa interneta

Kod:
Sub test()
    Dim d As Document: Set d = ActiveDocument
    Dim cnt As Integer
    cnt = 0
    For i = 1 To d.Words.Count
        If d.Words(i).HighlightColorIndex = wdNoHighlight Then
            cnt = cnt + 1
        End If
    Next
    MsgBox ("Neobojene reci: " & cnt)
End Sub
Pritisni Alt+F11, desno dugme na "This document", ubaci ovaj kod pa F5 da pokreneš.
voodoo_ je offline   Odgovor sa citatom ove poruke