How to apply faux bold to cells with particular content

In relation to my query I experimented a bit with the recent macro recorder and trimmed its bloated output to get the following macro which sure enough applies bold to cells O4 to O45 in all 12 of my sheets.

sub addTithiBold

	document = ThisComponent.CurrentController.Frame
	dispatcher = createUnoService("com.sun.star.frame.DispatchHelper")
	dispatcher.executeDispatch(document, ".uno:JumpToFirstTable", "", 0, Array())

	dim selectCells(0) as new com.sun.star.beans.PropertyValue
	dim addBoldAttr(0) as new com.sun.star.beans.PropertyValue

	selectCells(0).Name = "ToPoint"
	selectCells(0).Value = "$O$4:$O$45"
	addBoldAttr(0).Name = "Bold"
	addBoldAttr(0).Value = true
	
	sheet = 1
	do
		if sheet <> 1 then dispatcher.executeDispatch(document, ".uno:JumpToNextTable", "", 0, Array())
	
		dispatcher.executeDispatch(document, ".uno:GoToCell", "", 0, selectCells())
		dispatcher.executeDispatch(document, ".uno:Bold", "", 0, addBoldAttr())

		sheet = sheet + 1
	loop while sheet < 13

end sub

However I want to apply bold only to cells with particular textual content. Based on the solution given to my query, I was able to add the line:

if oCell.string = "पौर्णमासी" or oCell.string = "अमावास्या" then oCell.charWeight = com.sun.star.awt.FontWeight.BOLD else oCell.charWeight = com.sun.star.awt.FontWeight.NORMAL

but as I have noted in that answer, this is not sufficient to apply faux bold when the font itself does not provide a separate proper bold. However the above dispatch method produced by the macro recorder is able to apply faux bold. Now I’d like to know how to apply the dispatch method by selecting cells with a particular textual content.

Or if there is any other method also to get the required faux bold I’d be happy.

Thanks.

This Kind of stuff need no makro

select the Range of Interest goto →edit→Search and replace
search (पौर्णमासी)|(अमावास्या) with more Options: [x]regular Expression
→→find all and hit the Toolbar-button for bold…

Hey thanks for the reply but it would be good to automate this as this is a repeated process I have to do on multiple documents every now and then. If I have a macro, all I have to do is a click on the toolbar.

so record the Actions →Tools→Macros→Record Macro....

or apply better as →Format→Conditional Format→Condition with the obvious settings

@karolus: Thanks for your help. While conditional format still doesn’t apply faux bold, I recorded the actions and it works fine. Great!