title: How to add objects to object repository automatically using vb scripts?
body: <p>Is it possible to add objects to an object repository automatically using VBScript?</p>
  
  <p>Let's say I have list of links in my webpage/application. It would be time consuming, when I add objects manually so I tried to add objects to repository automatically. But couldn't able to proceed as I don't know how to activate object repository (during run time) in QTP.</p>
  
  <p>Below is my code which I tried:</p>
  
  <pre><code>Function Objects_Count(myObject)
    Dim Objects
    Set Objects=Description.Create
    Objects("micclass").value=myObject
    set obj=Browser("title:=.*").Page("title:=.*").ChildObjects(Objects)
    For i=0 to obj.count-1
      'msgbox i
      c=obj(i).getroproperty("name")
      If obj(i).Exist(1) Then
        obj(i).highlight
      End If
      Print c
    Next
  End Function
  Call Objects_Count("link")
  </code></pre>
  
  <p>The above code will get the links name displayed in a log file and also it will highlight in application/webpage. Please guide me how to add the properties of that links(objects)  to object repository.</p>
  
  <p>Thanks!</p>