Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

figured it out.

the macro helped me do it. I'm not sure if this is the best way to do it but it works fine.

sub add_second_person

dim odoc as object
dim odrawpage as object
dim oform as object
dim osecond_person as object
dim osecond_first_name as object

odoc = thisComponent
odrawpage = odoc.drawpage
oform = odrawpage.forms.getByName("Main Form")
osecond_person = oform.GetByName("txtSecond Person")
osecond_first_name = oform.GetByName("txtSecond Firstname")

if osecond_first_name.text = "" then  osecond_person.text = "" else if osecond_first_name.text <> "" then osecond_person.text = "and"

end sub

It was a pain in the butt, but I finaly figured it out myself. Hope I can help everyone who has the same problem.

Kind regards,

tinus087