Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Finding Custom Document Properties without opening Presentation

67 views
Skip to first unread message

Barb Reinhardt

unread,
Jul 20, 2007, 10:00:01 AM7/20/07
to
RB Smissaert in the Excel Programming newsgroup helped me to get this
function to find the custom document properties.

Function GetFileProperty(vFolder As Variant, _
strFile As String, _
Optional lIndex As Long, _
Optional strItemName As String) As String

Dim i As Long
Dim objShell As Object
Dim objFolder As Object
Dim objfolderitem As Object
Dim objItem As Object
Dim arrHeaders(41)


Debug.Print vFolder, strFile, strItemName

Set objShell = CreateObject("Shell.Application")
Set objFolder = objShell.Namespace(vFolder)

Set objfolderitem = objFolder.ParseName(strFile)


If Len(strItemName) > 0 Then
For i = 0 To objFolder.Items.Count
myHeader = objFolder.GetDetailsOf(objFolder, i)
Debug.Print i, myHeader
If myHeader = strItemName Then
lIndex = i
Exit For
End If
Next
End If

GetFileProperty = objFolder.GetDetailsOf(objfolderitem, lIndex)
Set objShell = Nothing

End Function

Unfortunately, the "properties" that it's finding are as follows:

0 Name
1 Size
2 Type
3 Date Modified
4 Date Created
5 Date Accessed
6 Attributes
7 Status
8 Owner
9 Author
10 Title
11 Subject
12 Category
13 Pages
14 Comments
15 Copyright
16 Artist
17 Album Title
18 Year
19 Track Number
20 Genre
21 Duration
22 Bit Rate
23 Protected
24 Camera Model
25 Date Picture Taken
26 Dimensions
27
28
29 Episode Name
30 Program Description
31
32 Audio sample size
33 Audio sample rate
34 Channels
35 Company
36 Description
37 File Version
38 Product Name
39 Product Version
40 Keywords

And these aren't custom properties for my presentation. Can someone help
me modify this code so that it gets me what I want?

Thanks,
Barb Reinhardt

Chirag

unread,
Jul 20, 2007, 11:37:01 AM7/20/07
to
Hi,

The following link could help you get started:
http://officeone.mvps.org/vba/get_creator_app_name.html

The DSO object lists custom properties in CustomProperties collection. Read
more about Dsofile.dll at
http://support.microsoft.com/default.aspx?scid=kb;EN-US;q224351

- Chirag

PowerShow - View multiple PowerPoint slide shows simultaneously
http://officeone.mvps.org/powershow/powershow.html

"Barb Reinhardt" <BarbRe...@discussions.microsoft.com> wrote in message
news:E56D4B86-C21D-42E2...@microsoft.com...

0 new messages