GetSummaryInfo
This method retrieves metadata from the input file.
HTM.GetSummaryInfo(nItem,lTotaltems,lValid,lType,lVal,szVal,szValUser)
where:
-
nItemis an integer which is the metadata item number. SeeKVSumtypeinkvtypes.hfor a list of values.For example,
KV_Authoris value 3, so settingnItemto3would retrieve the Author of the source document if this information was available. This is identical to using thepszAuthorproperty (some common metadata items are exposed as properties as well as being accessible through this method). -
lTotalItemsis a long which is returned to give the total number of metadata items possible. This is 34 for most documents (as defined inKVSumTypeinkvtypes.h), although all 34 might not be valid (seelValidparameter). If there is user-defined metadata available,lTotalItemsmight be greater than 34. -
lValidis a long which is 0 if the item is invalid (not available) and 1 if the information associated with this item is available. -
lTypeis a long which corresponds to theKVSumInfoTypeenumerated type defined inkvtypes.h. A value of 1 indicates thatszValcontains the string associated with this item (iflValidis also 1). A value of 2 indicates thatlValcontains a long associated with this item (iflValidis also 1). See KVSumType. -
szValUseris 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