Restrict TE-Plus searching

I want to run search/replace routines in Tex-Edit+ (NOT TexT Edit)
BUT I want to restrict the search to just bold occurrences.

How would I enable that, in the routine below?:

tell application “Tex-Edit Plus”

tell document 1
repeat with ThisText in RunInWords
set ThisText to ThisText as string
if paragraph p contains ThisText then
–if the occurrence of ThisText in para p is bold then
do something
–end if
end if
end repeat
end

end

An answer >


tell application "Tex-Edit Plus"
	repeat with ThisText in RunInWords
		set ThisText to ThisText as string
		if (search paragraph p looking for ThisText looking for styles {style:{bold}}) then
			--do something
		end if
	end repeat
end tell