J
jamiedora
Hello,
I was wondering if anyone could help. I am trying to retrieve metadata
from a series of word documents. I wish to tag each document's meta
data with custom properties (Name, Value, Type).
I am able to retireve summary info. such as "Author", but when I try to
access ther properties using the "sld2" variable I get the empty
string. Here is my code:
Public Sub RetrieveMetaData()
Dim sId
Dim sld2
Dim objShell
Dim objFolder
Dim objItem As Object
Dim DocProp
Dim strPath As Variant
Dim objFolderItem
Dim objword As Word.Application
Dim WordDocument As Word.Document
Dim objTree As TreeView
Dim objTargetNode As Node
Dim X As Variant
Set objTree = Me.xTree.Object
Set objShell = CreateObject("Shell.Application")
sId = "{F29F85E0-4FF9-1068-AB91-08002B27B3D9}" 'Summary information
property set. Defined in Ntquery.h.
sld2 = "{D5CDD505-2E9C-101B-9397-08002B2CF9AE}"
Title = "2"
Subject = "3"
sAuthor = "4"
Comments = "6"
X="?????????"
strDocument = "Test.doc"
strPath = "C:\"
Set objFolder = objShell.NameSpace(strPath)
Set objFolderItem = objFolder.ParseName(strDocument)
strDocumentInfo = objFolderItem.ExtendedProperty(sId & Comments)
strCustomInfo= objFolderItem.ExtendedProperty(sld2& X)
End Sub
I was wondering if anyone could help. I am trying to retrieve metadata
from a series of word documents. I wish to tag each document's meta
data with custom properties (Name, Value, Type).
I am able to retireve summary info. such as "Author", but when I try to
access ther properties using the "sld2" variable I get the empty
string. Here is my code:
Public Sub RetrieveMetaData()
Dim sId
Dim sld2
Dim objShell
Dim objFolder
Dim objItem As Object
Dim DocProp
Dim strPath As Variant
Dim objFolderItem
Dim objword As Word.Application
Dim WordDocument As Word.Document
Dim objTree As TreeView
Dim objTargetNode As Node
Dim X As Variant
Set objTree = Me.xTree.Object
Set objShell = CreateObject("Shell.Application")
sId = "{F29F85E0-4FF9-1068-AB91-08002B27B3D9}" 'Summary information
property set. Defined in Ntquery.h.
sld2 = "{D5CDD505-2E9C-101B-9397-08002B2CF9AE}"
Title = "2"
Subject = "3"
sAuthor = "4"
Comments = "6"
X="?????????"
strDocument = "Test.doc"
strPath = "C:\"
Set objFolder = objShell.NameSpace(strPath)
Set objFolderItem = objFolder.ParseName(strDocument)
strDocumentInfo = objFolderItem.ExtendedProperty(sId & Comments)
strCustomInfo= objFolderItem.ExtendedProperty(sld2& X)
End Sub