GetFolderDisplayFieldName method

This method is intended for use with Visual Basic.

Method
short GetFolderDisplayFieldName(
  • short Index,
  • BSTR * pName )
Parameters:
Index
Specifies the zero-based index of the name to be returned. It must be a number greater than or equal to zero and less than the value returned by GetFolderDisplayFieldName.
pName
Points to a BSTR to receive the name of the field.
Description
The specified field name is returned in pName.

GetNumFolderDisplayFields or GetFolderDisplayFieldName can be used to retrieve the folder display field names. An application should use the one which is more convenient in its environment.

Return Value
Refer to return codes.
See Also
GetNumFolderDisplayFields or GetFolderDisplayFieldName methods

Visual Basic

The following example creates a list box of the folder document list names and associated values and opens the document selected by a user.
Dim rc, count, i, j As Integer
Dim num_fields, num_docs As Variant
Dim Names() As String
Dim Line As String
Dim Temp As String
 .
 .
 .
rc = ArsOle.GetNumFolderDisplayFields(num_fields)
If rc <> ARS_OLE_RC_SUCCESS Then
    MsgBox "ERROR"
    End
End If

ReDim Names(num_fields)

For count = 0 To num_fields -1
    rc = ArsOle.GetFolderDisplayFieldName(count, Temp)
    Names(count) = Temp
Next count

rc = ArsOle.GetNumDocsInList(num_docs)
If rc <> ARS_OLE_RC_SUCCESS Then
    MsgBox "ERROR"
    End
End If
For j = 0 To num_docs -1
    For i = 0 To num_fields -1
        rc = ArsOle.GetDocDisplayValue(j, i, Temp)

        Line = Line + Names(i) + " = " + Temp
        If i < num_fields Then
            Line = Line + ", "
        End If
    Next i

    lbDocs.AddItem Line
Next j
 .
 .
 .
'During OK button processing:

rc = ArsOle.OpenDoc (lbDocs.List(lbDocs.ListIndex), "", 0)
If rc <> ARS_OLE_RC_SUCCESS Then
    MsgBox "ERROR"
    End
End If