GetDocDisplayValue method

This method is intended for use with Visual Basic.

Method
short GetDocDisplayValue(
long DocIndex,
short ValueIndex,
BSTR * pValue )
Parameters
DocIndex
Specifies the zero-based index of a document within the document list of the active folder.
ValueIndex
Specifies the zero-based index of the value to be returned. It must be a number greater than or equal to zero and less than the value returned by GetNumFolderDisplayFields.
pValue
Points to a BSTR to receive the value.
Description
The specified value is returned in pValue. GetDocDisplayValue or GetDocDisplayValues can be used to retrieve the document display values. An application should use the one which is more convenient in its environment.
Return Value
Refer to return codes.
See Also:
GetNumDocsInList, GetNumFolderDisplayFields, GetDocDisplayFieldNames, GetDocDisplayValues, and OpenDoc methods
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