Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
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
Posted to microsoft.public.excel.misc
|
|||
|
|||
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
Posted to microsoft.public.excel.misc
|
|||
|
|||
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
Posted to microsoft.public.excel.misc
|
|||
|
|||
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
Posted to microsoft.public.excel.misc
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How do I print file properties with worksheet in excel ? | Excel Discussion (Misc queries) | |||
is it possible to print file properties in excel? | Excel Discussion (Misc queries) | |||
How do I print the Excel File Properties Contents screen? | Excel Discussion (Misc queries) | |||
How can you print file properties in an Excel spreadsheet? | Excel Discussion (Misc queries) | |||
Unusual "Properties" information | Excel Discussion (Misc queries) |