auch dieses Beispiel wird in Andrews Makro-Dokument behandelt:
Code: Alles auswählen
REM Get the document's draw page and force the top level form to
REM exist and be named "Standard".
oDrawPage = oDoc.DrawPage
If oDrawPage.Forms.Count = 0 Then
s$ = "com.sun.star.form.component.Form"
oDBForm = oDoc.CreateInstance(s$)
oDrawpage.Forms.InsertByIndex (0, oDBForm)
Else
oDBForm = oDrawPage.Forms.GetByIndex(0)
End If
oDBForm.Name = "Standard"