Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8
Default Displaying Document Properties in Excel

This should be pretty straight forward, but I can't find it for the life of
me. I have a document with a bunch of properties, and I want these properties
to be displayed in certain cells on my spreadsheet. What formula can I use to
retrieve the document property??
Thanks
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 10,593
Default Displaying Document Properties in Excel

'-----------------------------------------------------------------
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




and enter in a cell such as
=DocProps ("last author")
or
=DocProps ("last save time")


--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"AlwaysFroosh!" wrote in message
...
This should be pretty straight forward, but I can't find it for the life

of
me. I have a document with a bunch of properties, and I want these

properties
to be displayed in certain cells on my spreadsheet. What formula can I use

to
retrieve the document property??
Thanks



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 22,906
Default Displaying Document Properties in Excel

First off.........save a backup of your workbook.

Then use this User Defined Function

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("last author")
'or
'=DOCPROPS("last save time")
'or
'DOCPROPS("creation date")

For a list of other properties that may be available(not all are), run this
macro.

Sub props()
rw = 1
Worksheets.Add
For Each p In ActiveWorkbook.BuiltinDocumentProperties
Cells(rw, 1).Value = p.Name
rw = rw + 1
Next
End Sub


If not familiar with VBA and macros, see David McRitchie's site for more on
"getting started".

http://www.mvps.org/dmcritchie/excel/getstarted.htm

In the meantime..........

To create a General Module, hit ALT + F11 to open the Visual Basic Editor.

Hit CRTL + R to open Project Explorer.

Find your workbook/project and select it.

Right-click and InsertModule. Paste the above code in there. Save the
workbook and hit ALT + Q to return to Excel window.

Enter the formula as shown above.


Gord Dibben Excel MVP

On Tue, 26 Sep 2006 10:57:01 -0700, AlwaysFroosh!
wrote:

This should be pretty straight forward, but I can't find it for the life of
me. I have a document with a bunch of properties, and I want these properties
to be displayed in certain cells on my spreadsheet. What formula can I use to
retrieve the document property??
Thanks


Gord Dibben MS Excel MVP
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
CLR CLR is offline
external usenet poster
 
Posts: 1,998
Default Displaying Document Properties in Excel

Lots of info here.....

http://www.cpearson.com/excel/docprop.htm

Vaya con Dios,
Chuck, CABGx3



"AlwaysFroosh!" wrote:

This should be pretty straight forward, but I can't find it for the life of
me. I have a document with a bunch of properties, and I want these properties
to be displayed in certain cells on my spreadsheet. What formula can I use to
retrieve the document property??
Thanks

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
I need to merge into an Excel Main Document with Excel Data-How? Janet Excel Discussion (Misc queries) 1 April 4th 06 12:04 AM
How can I using Excel custom document properties in the header? ecalvo Excel Worksheet Functions 4 November 3rd 05 09:29 PM
Connect document properties to headers and footers Jeroen Excel Discussion (Misc queries) 1 October 31st 05 09:19 AM
Excel Range Value issue (Excel 97 Vs Excel 2003) Keeno Excel Discussion (Misc queries) 2 June 13th 05 02:01 PM
How to embed Word document into Excel and retain sizing, formatti. Kent Excel Discussion (Misc queries) 0 February 2nd 05 07:37 PM


All times are GMT +1. The time now is 07:05 PM.

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

About Us

"It's about Microsoft Excel"