RE: Reading Word's Custom Properties without opening a doc?

Subject: RE: Reading Word's Custom Properties without opening a doc?
From: "Rob Partridge" <rob -at- holly -dot- com -dot- au>
To: "TECHWR-L" <techwr-l -at- lists -dot- raycomm -dot- com>
Date: Mon, 9 Aug 2004 14:10:55 +1000



Never mind... I may have found my solution. I finally found this on the web:

Sub GetCProps()
Dim oFilePropReader As DSOleFile.PropertyReader
Dim oDocProp As DSOleFile.DocumentProperties
Dim oCustProp As DSOleFile.CustomProperty
Dim sTmp As String

Set oFilePropReader = New DSOleFile.PropertyReader

With Dialogs(wdDialogFileOpen)
If .Display = -1 Then
Set oDocProp = oFilePropReader.GetDocumentProperties( _
WordBasic.FileNameInfo$(.Name, 1))
For Each oCustProp In oDocProp.CustomProperties
sTmp = oCustProp.Name & ": " & CStr(oCustProp.Value)
Selection.InsertAfter sTmp
Selection.InsertParagraphAfter
Selection.Collapse Direction:=wdCollapseEnd
Next oCustProp
End If
End With

End Sub

Which uses that same dll to get access to the custom props. This subroutine
lists all the custom properties in a document, but I can adapt it for my
uses. Thanks for all your help guys,

Rob


^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

ROBOHELP X5: Featuring Word 2003 support, Content Management, Multi-Author
support, PDF and XML support and much more!
TRY IT TODAY at http://www.macromedia.com/go/techwrl

WEBWORKS FINALDRAFT: New! Document review system for Word and FrameMaker
authors. Automatic browser-based drafts with unlimited reviewers. Full
online discussions -- no Web server needed! http://www.webworks.com/techwr-l

---
You are currently subscribed to techwr-l as:
archiver -at- techwr-l -dot- com
To unsubscribe send a blank email to leave-techwr-l-obscured -at- lists -dot- raycomm -dot- com
Send administrative questions to ejray -at- raycomm -dot- com -dot- Visit
http://www.raycomm.com/techwhirl/ for more resources and info.



References:
Reading Word's Custom Properties without opening a doc?: From: Rob Partridge

Previous by Author: Reading Word's Custom Properties without opening a doc?
Next by Author: RE: Top Ten Things You'd Like To Tell Engineers
Previous by Thread: Reading Word's Custom Properties without opening a doc?
Next by Thread: RE: Reading Word's Custom Properties without opening a doc?


What this post helpful? Share it with friends and colleagues:


Sponsored Ads