6 replies
by noog
Also, this is from the properties file menu option.
thanks
by awilliams3
You can utilize VBA code to 'dump' all the document properties.
I hope this may help, your request is somewhat unclear?
Sub dumpproperties()
Dim docItem As Office.DocumentProperty
Dim wbkResults As Excel.Workbook
Dim wshtResultsAs Excel.Worksheet
Dim rngItem As Excel.Range
Dim lngCount As Long
Dim varPropertyValue As Variant
On Error Resume Next
Set rngItem = Application.InputBox(prompt:="Select a cell...", _
Title:="PropertyFinder...", _
Type:=8)
On Error GoTo 0
If rngItem Is Nothing Then
Exit Sub
End If
Set wbkResults = Application.Workbooks.Add
Set wshtResults = wbkResults.Worksheets(1)
wshtResults.Cells(1, 1).EntireColumn.Font.Bold = True
wshtResults.Cells(1, 1).Value = "Properties for:"
wshtResults.Cells(1, 2).Value = rngItem.Parent.Parent.Name
lngCount = 2
For Each docItem In rngItem.Parent.Parent.BuiltinDocumentProperties
varPropertyValue = ""
On Error Resume Next
varPropertyValue = docItem.Value
On Error GoTo 0
If Not varPropertyValue = "" Then
wshtResults.Cells(lngCount, 1).Value = docItem.Name
wshtResults.Cells(lngCount, 2).Value = varPropertyValue
lngCount = lngCount + 1
End If
Next docItem
For Each docItem In ThisWorkbook.CustomDocumentProperties
wshtResults.Cells(lngCount, 1).Value = docItem.Name
wshtResults.Cells(lngCount, 2).Value = docItem.Value
lngCount = lngCount + 1
Next docItem
wshtResults.Cells.EntireColumn.AutoFit
Set rngItem = Nothing
Set docItem = Nothing
Set wbkResults = Nothing
Set wshtResults = Nothing
End Sub
by noog
by noog
This discussion is closed to new replies.
Trending Software posts
Sort by Trending