Try using DSO.
Download it here:
http://www.microsoft.com/downloads/...C6-520B-4A0A-878A-53EC8300C4C2&displaylang=en
You need to reference the DSO OLE Document Properties Reader you
downloaded from the above link. Obviously, rs is a DAO recordset for
the metadata. You want the combination of ApplicationName and
Version.
Here's a code snippet from an access module capturing metadata:
Dim oDocumentProps As DSOFile.OleDocumentProperties
Dim oSummProps As DSOFile.SummaryProperties
Dim oCustProp As DSOFile.CustomProperty
Set m_oDocumentProps = New DSOFile.OleDocumentProperties
m_oDocumentProps.Open locTempP, fOpenReadOnly,
dsoOptionOpenReadOnlyIfNoWriteAccess
' Get the SummaryProperties (these are built-in set)...
Set oSummProps = m_oDocumentProps.SummaryProperties
rs.AddNew
' other code capturing path and other file system info
rs("application") = oSummProps.ApplicationName
rs("version") = oSummProps.Version
rs("subject") = oSummProps.Subject
rs("category") = oSummProps.Category
rs("company") = oSummProps.Company
rs("keywords") = oSummProps.Keywords
rs("manager") = oSummProps.Manager
rs("author") = oSummProps.Author
'Debug.Print oSummProps.DateLastPrinted
rs("lastsavedby") = oSummProps.LastSavedBy
rs("wordcount") = (oSummProps.WordCount)
rs("pagecount") = (oSummProps.PageCount)
rs("paragraphcount") = (oSummProps.ParagraphCount)
rs("linecount") = (oSummProps.LineCount)
rs("charactercount") = (oSummProps.CharacterCount)
rs("charcountwith_") =
(oSummProps.CharacterCountWithSpaces)
rs("bytecount") = (oSummProps.ByteCount)
rs("presformat") = oSummProps.PresentationFormat
rs("slidecount") = (oSummProps.SlideCount)
rs("notecount") = (oSummProps.NoteCount)
rs("hiddenslides") = (oSummProps.HiddenSlideCount)
rs("mmclipcount") = (oSummProps.MultimediaClipCount)
rs("createdon") = Format$
(CDate(oSummProps.DateCreated), "MM/DD/YYYY")
rs("lastprintedon") =
CDate(oSummProps.DateLastPrinted)
If CDate(oSummProps.DateLastSaved) = "12:00:00 AM"
Then
rs("lastmodified") = Format$
(CDate(oSummProps.DateCreated), "MM/DD/YYYY") 'CDate("1/1/1900")
Else
rs("lastmodified") = Format$
(CDate(oSummProps.DateLastSaved), "MM/DD/YYYY")
End If
rs("timeediting") = (oSummProps.TotalEditTime)
rs("template") = oSummProps.Template
rs("revision") = oSummProps.RevisionNumber
rs("isshared") = CBool(oSummProps.SharedDocument)
rs.Update