Is it possible to force population of a control

Ive been trying to use the professional version to set the imbedded Edit Controls with a label, however when I trying to get the object list I get an error -23 when trying to open the project.

With objLL hProj = .LlProjectOpen(LL_PROJECT_LABEL, sPathAndFile, LL_PRJOPEN_AM_READWRITE) Lret = .LlDomGetObject(hProj, "Objects", hObjList)

Ideally I want to populate two Edit Fields and then lock them both, but I’m falling over at the first hurdle.

Anyone have any ideas?

Well finally got the code working… mostly

        .LlDomSetProperty

doesn’t seem to work with the Locked and ReadOnly (hence the three variations)

Any one know the correct syntax?

 
With ListLabelObj
        
       Call GrabData(sPathAndFile)
       Call .LlSetOption(LL_OPTION_INCREMENTAL_PREVIEW, 0)

       lRet = .LlPreviewSetTempPath("")
       lRet = .LlPrintWithBoxStart(LL_PROJECT_LABEL, sPathAndFile, LL_PRINT_PREVIEW, LL_BOXTYPE_STDABORT, Me.hWnd, "Printing...")
       
       lRet = .LlDomGetProject(hProj)
       lRet = .LlDomGetObject(hProj, "Objects", hObjList)
       lRet = .LlDomGetSubobjectCount(hObjList, lCount)
       For i = 1 To lCount
         lRet = .LlDomGetSubobject(hObjList, i, hSub)
         lRet = .LlDomGetProperty(hSub, "Name", sVal)
         Select Case sVal
         Case "Losnummer"
            lRet = .LlDomSetProperty(hSub, "DefaultValueText", "'" & m_sLossNumber & "'")
            lRet = .LlDomSetProperty(hSub, "Locked", "True")
            lRet = .LlDomSetProperty(hSub, "ReadOnly", "True")
            
         Case "Deutschland"
            lRet = .LlDomSetProperty(hSub, "DefaultValueText", "'" & m_sOrigin & "'")
            lRet = .LlDomSetProperty(hSub, "Locked", True)
            lRet = .LlDomSetProperty(hSub, "ReadOnly", True)
            
         Case "ggn"
            lRet = .LlDomSetProperty(hSub, "DefaultValueText", "'" & m_sGGN & "'")
            lRet = .LlDomSetProperty(hSub, "Locked", "'True'")
            lRet = .LlDomSetProperty(hSub, "ReadOnly", "'True'")
            
         Case Else
         
         End Select
       Next i
       

       
       lRet = .LlPrint()
       lRet = .LlPrintEnd(0)
       If lRet = -4 Then
            b = False
            GoTo exitHere
       Else
            'loads prieview file LL
            LlView.FileURL = sPathAndFile
            Call LlView.SetZoom(m_lZoom)
      End If
   End With

Had no joy with the .LlDomSetProperty setting the ReadOnly or Locked.
So in the end I had to settle for disabling the preview.
ie
LlView.endabled = false.

But it does mean if a label design with more controls is supplied by the customer then a code change will be required.