Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 10
Default "Properties" Information Extraction

How can I extract data from Properties (like Last Saved By:) and display it
in a cell?
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,316
Default "Properties" Information Extraction

You can use the UDF do insert the Last Author in a cell:

Press Alt+F11, click INSERT on the MENU and select MODULE.

In the module, copy the text below from the line that starts with function
through the line that say "End Function"

Function Properties()

Dim strPropVal As String

Properties = ThisWorkbook. _
BuiltinDocumentProperties( _
"Last Author").Value

End Function

Use it as you would any function by type = PROPERTIES() in the cell you want
the result in and press enter.

For a complete list of properties, double click the keyword
"BuiltinDocumentProperties" whiile in the VBE and press F1.

Hope this helps...
--
Kevin Backmann


"JohnS" wrote:

How can I extract data from Properties (like Last Saved By:) and display it
in a cell?

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 10
Default "Properties" Information Extraction

Kevin - Many thanks for this help. I'll try it later tonight.

JohnS

"Kevin B" wrote:

You can use the UDF do insert the Last Author in a cell:

Press Alt+F11, click INSERT on the MENU and select MODULE.

In the module, copy the text below from the line that starts with function
through the line that say "End Function"

Function Properties()

Dim strPropVal As String

Properties = ThisWorkbook. _
BuiltinDocumentProperties( _
"Last Author").Value

End Function

Use it as you would any function by type = PROPERTIES() in the cell you want
the result in and press enter.

For a complete list of properties, double click the keyword
"BuiltinDocumentProperties" whiile in the VBE and press F1.

Hope this helps...
--
Kevin Backmann


"JohnS" wrote:

How can I extract data from Properties (like Last Saved By:) and display it
in a cell?

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22,906
Default "Properties" Information Extraction

You will need a 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

Enter in a cell one of the below...............

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

For a list of all built-in Document Proerties, run this macro after copying the
DocProps function to a general module in your workbook.

Paste the macro into the same module.

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 Thu, 5 Jun 2008 09:33:00 -0700, JohnS
wrote:

How can I extract data from Properties (like Last Saved By:) and display it
in a cell?


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
change "true" and "false" to "availble" and "out of stock" inthestands Excel Worksheet Functions 2 July 19th 07 07:05 PM
Scroll Bar missing "Control" tab in "Format Properties" dialog box Peter Rooney Excel Discussion (Misc queries) 5 August 24th 06 05:36 PM
HELP on "left","right","find","len","substitute" functions serene83 Excel Discussion (Misc queries) 5 June 27th 06 02:23 AM
Count occurences of "1"/"0" (or"TRUE"/"FALSE") in a row w. conditions in the next BCB New Users to Excel 7 May 13th 06 10:02 PM
Properties "Total Editing Time" not calculated MBo Setting up and Configuration of Excel 1 October 30th 05 11:51 PM


All times are GMT +1. The time now is 11:46 AM.

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"