# GetSummaryInfo

This method retrieves metadata from the input file.

    HTM.GetSummaryInfo(nItem, lTotaltems, lValid, lType, lVal, szVal, szValUser)

where:

- `nItem` is an integer which is the metadata item number. See `KVSumtype` in `kvtypes.h` for a list of values.

  For example, `KV_Author` is value 3, so setting `nItem` to `3` would retrieve the Author of the source document if this information was available. This is identical to using the `pszAuthor` property (some common metadata items are exposed as properties as well as being accessible through this method).

- `lTotalItems` is a long which is returned to give the total number of metadata items possible. This is 34 for most documents (as defined in `KVSumType` in `kvtypes.h`), although all 34 might not be valid (see `lValid` parameter). If there is user-defined metadata available, `lTotalItems` might be greater than 34.

- `lValid` is a long which is 0 if the item is invalid (not available) and 1 if the information associated with this item is available.

- `lType` is a long which corresponds to the `KVSumInfoType` enumerated type defined in `kvtypes.h`. A value of 1 indicates that `szVal` contains the string associated with this item (if `lValid` is also 1). A value of 2 indicates that `lVal` contains a long associated with this item (if `lValid` is also 1). See KVSumType.

- `szValUser` is a string description of the metadata item.

## Sample Code

The following code from the `comsamp` sample program demonstrates how to use the `GetSummaryInfo` method:

    Dim nTotal As Long
    Dim nValid As Long
    Dim nType As Long
    Dim nVal As Long
    Dim szVal As String
    Dim szUserVal As String
    On Error GoTo Handler
    ' Get the Author if available (item 3 is the Author. See KVSumType
    ' in kvtypes.h for a list of items and their values)
    Call MyRef.GetSummaryInfo(3, nTotal, nValid, nType, nVal, szVal, szUserVal)
    MsgBox szUserVal & " = " & szVal

_FT_HTML5_bannerTitle.htm