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. SeeKVSumtype
inkvtypes.h
for a list of values.For example,
KV_Author
is value 3, so settingnItem
to3
would retrieve the Author of the source document if this information was available. This is identical to using thepszAuthor
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 inKVSumType
inkvtypes.h
), although all 34 might not be valid (seelValid
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 theKVSumInfoType
enumerated type defined inkvtypes.h
. A value of 1 indicates thatszVal
contains the string associated with this item (iflValid
is also 1). A value of 2 indicates thatlVal
contains a long associated with this item (iflValid
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