Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default How do I print Excel file properties information?

I would like to print Excel file properties like it is possible to do for
Word documents to show date created, saved, etc. Is there a way to do this?
Thanks for the help.
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22,906
Default How do I print Excel file properties information?

Andy

With some code you can get the built-in Document Properties.

I don't know how extensive "etc" is but if you want to print out Custom
Properties also that would take much more code.

For built-ins you can use this UDF

Function DocProps(prop As String)
Application.Volatile
On Error GoTo err_value
DocProps = ActiveWorkbook.BuiltinDocumentProperties _
(prop)
Exit Function
err_value:
DocProps = CVErr(xlErrValue)
End Function

'=DOCPROPS("author")
'or
'=DOCPROPS("last save time")
'or
'DOCPROPS("creation date")

To get a list of all available built-ins on a new sheet run this macro.

Sub documentprops()
'list of properties on a new sheet
rw = 1
Worksheets.Add
For Each p In ActiveWorkbook.BuiltinDocumentProperties
Cells(rw, 1).Value = p.Name
Cells(rw, 4).Value = "=DocProps(" & "A" & rw & ")"
rw = rw + 1
Next
End Sub


Gord Dibben MS Excel MVP

On Sat, 16 Aug 2008 07:46:01 -0700, Andy Holm <Andy
wrote:

I would like to print Excel file properties like it is possible to do for
Word documents to show date created, saved, etc. Is there a way to do this?
Thanks for the help.


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,501
Default How do I print Excel file properties information?

Hi,

Right click the sheet tab where you want the report, view code and paste
this an run it

Sub Properties()
x = 1
Cells(x, 1).Value = "Properties"
x = x + 1
For Each p In ActiveWorkbook.BuiltinDocumentProperties
On Error Resume Next
Cells(x, 1).Value = p.Name
Cells(x, 2).Value = p.Value
x = x + 1
Next
On Error GoTo 0
End Sub


Miek

"Andy Holm" wrote:

I would like to print Excel file properties like it is possible to do for
Word documents to show date created, saved, etc. Is there a way to do this?
Thanks for the help.

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,501
Default How do I print Excel file properties information?

Gord

....if you want to print out Custom
Properties also that would take much more code.


Unless I'm missing something for Custom properties don't you simply
substitute this
in my answer

For Each p In ActiveWorkbook.BuiltinDocumentProperties

with this

For Each p In ActiveWorkbook.CustomDocumentProperties

Mike


"Gord Dibben" wrote:

Andy

With some code you can get the built-in Document Properties.

I don't know how extensive "etc" is but if you want to print out Custom
Properties also that would take much more code.

For built-ins you can use this UDF

Function DocProps(prop As String)
Application.Volatile
On Error GoTo err_value
DocProps = ActiveWorkbook.BuiltinDocumentProperties _
(prop)
Exit Function
err_value:
DocProps = CVErr(xlErrValue)
End Function

'=DOCPROPS("author")
'or
'=DOCPROPS("last save time")
'or
'DOCPROPS("creation date")

To get a list of all available built-ins on a new sheet run this macro.

Sub documentprops()
'list of properties on a new sheet
rw = 1
Worksheets.Add
For Each p In ActiveWorkbook.BuiltinDocumentProperties
Cells(rw, 1).Value = p.Name
Cells(rw, 4).Value = "=DocProps(" & "A" & rw & ")"
rw = rw + 1
Next
End Sub


Gord Dibben MS Excel MVP

On Sat, 16 Aug 2008 07:46:01 -0700, Andy Holm <Andy
wrote:

I would like to print Excel file properties like it is possible to do for
Word documents to show date created, saved, etc. Is there a way to do this?
Thanks for the help.



  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,058
Default How do I print Excel file properties information?

How about this macro:

Sub Macro1()
With ActiveSheet.PageSetup
.PrintTitleRows = ""
.PrintTitleColumns = ""
End With
ActiveSheet.PageSetup.PrintArea = ""
With ActiveSheet.PageSetup
.CenterHeader = ""
.LeftHeader = ""
i = 1
For Each wp In ActiveWorkbook.BuiltinDocumentProperties
If i = 12 Or i = 11 Then
On Error Resume Next
.CenterHeader = .CenterHeader & wp.Name & " " & wp.Value &
Chr(10)
End If
i = i + 1
Next

End With
End Sub

--
Gary''s Student - gsnu200800


"Andy Holm" wrote:

I would like to print Excel file properties like it is possible to do for
Word documents to show date created, saved, etc. Is there a way to do this?
Thanks for the help.

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I print file properties with worksheet in excel ? redd Excel Discussion (Misc queries) 3 September 26th 06 06:40 PM
is it possible to print file properties in excel? Chrystalla Excel Discussion (Misc queries) 1 August 11th 05 12:22 PM
How do I print the Excel File Properties Contents screen? Gail Chiarello Excel Discussion (Misc queries) 1 August 2nd 05 08:51 PM
How can you print file properties in an Excel spreadsheet? RSG Excel Discussion (Misc queries) 1 February 21st 05 08:33 PM
Unusual "Properties" information Susan Excel Discussion (Misc queries) 4 January 26th 05 08:15 PM


All times are GMT +1. The time now is 04:38 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"