Writer document, macro to change field placeholder

i ve an writer document with some fields type placeholder format text. the placeholder is empty, reference is for example street.i need to get the field reference “street” and change the placeholder “value” inside the macro

how can i change the placeholder value inside the macro?

i ve search hours, but found nothing about that.

thanks a lot!

See chapter 5.18.2. Text Fields in the Pitonyak’s book - there is Listing 5.48: Enumerate text fields provide by Heike Talhammer

Thanks a lot,
i ve found the answer:

	strsum = "com.sun.star.text.fieldmaster.SetExpression.sum"
if oDoc.getTextFieldMasters.hasByName(strsum) then
	oVar  = oDoc.getTextFieldMasters.getByName(strsum)
	oVar.DependentTextFields(0).content = sum
end if