Using VB5/LAPI to manipulate Compound Documents
We are trying to get a Compound Document and cycle through the associated documents contained within.Getting the Compound Doc and the list of associated documents seems to work. Once we are trying to process the child records the LL_TableGetRecord does not return a record.Below is our code.Any assistance/recommendations appreciated. ' get Compound Doc info status = LL_GetObjectInfo( _ session, _ parentVol, _ 109056, _ compoundDocObj) status = LL_AssocGetInteger(compoundDocObj, "ID", TheCompoundId) status = LL_AssocGetInteger(compoundDocObj, "ChildCount", TheChildCount) status = LL_AssocGetInteger(compoundDocObj, "Container", TheContainer) status = LL_AssocGetInteger(compoundDocObj, "Type", TheType) status = LL_AssocGetInteger(compoundDocObj, "SubType", TheSubType) status = LL_AssocGetInteger(compoundDocObj, "ParentID", TheParentID) status = LL_AssocGetInteger(compoundDocObj, "VolumeID", TheVolumeID) Dim TheCDName As String * 100 status = LL_AssocGetString(compoundDocObj, "Name", TheCDName, 101, myOutSize) TheCDName = Mid$(TheCDName, 1, myOutSize) ' load RecArray children with objects within Compound Document status = LL_ListObjects( _ session, _ TheVolumeID, _ TheCompoundId, _ vbNullString, _ vbNullString, _ LL_PERM_FULL, _ childrenRecArray) status = LL_ValueGetType(childrenRecArray, TheValueType) ' LL_TABLE = -110 If TheValueType <> LL_TABLE Then MsgBox ("Not a table...") End If' Works to here Dim ii As Long For ii = 1 To TheChildCount ' get the current record into ChildRecord status = LL_TableGetRecord(childrenRecArray, ii, ChildRecord) 'LL_RECORD = -109 status = LL_ValueGetType(ChildRecord, TheChildRecordType) If TheChildRecordType <> LL_RECORD Then MsgBox ("Not a record...") End If status = LL_RecordGetInteger(ChildRecord, "ID", MyChildID) Next