View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.programming
Andy Wiggins Andy Wiggins is offline
external usenet poster
 
Posts: 107
Default CustomDocumentProperties

I can't comment on Chip's code, but here is an alternative you might want to
consider.

http://www.bygsoftware.com/examples/...Properties.zip

The workbook has a family of VBA routines to help you create, amend, and
delete Custom Document Properties

It's in the "Administration Utilities" section on page:
http://www.bygsoftware.com/examples/examples.htm

The code is open and commented.

--

Regards
Andy Wiggins
www.BygSoftware.com
Home of "Save and BackUp",
"The Excel Auditor" and "Byg Tools for VBA"


"Robert Hind" wrote in message
...
I'm trying to use some code I've found on Chip Pearson's web site to

access
CustomDocumentProperties in Closed Files but without success. The code is

as
follows. Can anyone help?

Dim FileName As String
Dim DSO As DSOleFile.PropertyReader
Set DSO = New DSOleFile.PropertyReader
FileName = "C:\Book1.xls"
With DSO.GetDocumentProperties(sfilename:=FileName)
Debug.Print .AppName
Debug.Print .Author
Debug.Print .ByteCount
Debug.Print .Company
'
' lots more properties
'
End With


__________________________________________________ ________________