I successfully run the macro. If ever anyone would want to use.
You can use this code
'Get list of profiles used
profiles = objOpenSTAAD.Property.GetSectionPropertyCount()
Cells(4, 2).Value = profiles
Dim refNo As Long
Dim profname As String
For i = 0 To profiles
refNo = i
objOpenSTAAD.Property.GetSectionPropertyName refNo, profname
Cells(i + 5, 2).Value = profname
Next i
Cells(1, 1).Select