|
ED
|
avaliable
|
RT
|
not used
|
This Method is able to create SubItems of the actual object, the
Parameter has to be the Name of the SubItem to be created.
Sub Base() Dim zProject As Project Dim zRema As Rema Dim bResult As Boolean 'get Project and Rema object Set zProject = MyWorkspace.ActiveDocument Set zRema = zProject.Remas.Item("MyRema") 'create SubItem States.... bResult = CreateSubItem(zRema, "State") If bResult Then MsgBox "SubItem 'State' was created successfully!" Else MsgBox "SubItem 'State' already exists or could not be created!" End If End Sub Function CreateSubItem(zenOnObject As Object, strDynProperty As String) As Boolean Dim nCount As Integer 'get count of given DynProperty nCount = zenOnObject.DynProperties(strDynProperty & "[-1]") If nCount = 0 Then '0 = DynProperty-SubItem not found 'create SubItem with given parameters... CreateSubItem = zenOnObject.CreateDynProperty(strDynProperty) Exit Function End If CreateSubItem = False End Function