+ Reply to Thread
Results 1 to 9 of 9

file summary properties help

  1. #1
    Registered User
    Join Date
    10-04-2006
    Posts
    4

    file summary properties help

    Just wondering if anyone knows how I can get file properites summary information into excel cells.

    By file summary I mean if you right click on an excel workbook before opening and click the summary tab, you are given file information.

    I need to get this information into excel cells

    thanks for any help

  2. #2
    Forum Expert oldchippy's Avatar
    Join Date
    02-14-2005
    Location
    Worcester, UK
    MS-Off Ver
    Excel 2007 (Home)
    Posts
    7,097

    Thumbs up

    Quote Originally Posted by rlc555
    Just wondering if anyone knows how I can get file properites summary information into excel cells.

    By file summary I mean if you right click on an excel workbook before opening and click the summary tab, you are given file information.

    I need to get this information into excel cells

    thanks for any help
    Hi rlc555,

    Take a look at this link, it may help you

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

    oldchippy

  3. #3
    Registered User
    Join Date
    10-04-2006
    Posts
    4
    thanks for the help, but cant get it to read the summary tab in the properties dialog

  4. #4
    Forum Expert oldchippy's Avatar
    Join Date
    02-14-2005
    Location
    Worcester, UK
    MS-Off Ver
    Excel 2007 (Home)
    Posts
    7,097
    Quote Originally Posted by rlc555
    thanks for the help, but cant get it to read the summary tab in the properties dialog
    What specific properties from the dialog are you after?

  5. #5
    Registered User
    Join Date
    10-05-2006
    Posts
    4
    Quote Originally Posted by rlc555
    Just wondering if anyone knows how I can get file properites summary information into excel cells.

    By file summary I mean if you right click on an excel workbook before opening and click the summary tab, you are given file information.

    I need to get this information into excel cells

    thanks for any help
    Hey rlc555,

    If you just need some of the these properties like Title, Subject or Author you can use activeworkbook.PropertName like activeworkbook.title, activeworkbook.subject or activeworkbook.author but if you need all the properties then you can use something like the following code,

    '''''''''''''''''''''''''''''''''''''''
    Sub Properties()

    rw = 1

    For Each p In ActiveWorkbook.BuiltinDocumentProperties

    Cells(rw, 1) = p.Name

    On Error Resume Next

    Cells(rw, 2) = p.Value

    rw = rw + 1

    Next

    End Sub

    ''''''''''''''''''''''''''''''''''''''''''''''''

  6. #6
    Registered User
    Join Date
    10-04-2006
    Posts
    4
    so if i wanted the author

    what exactly would i put in the cell?

    =activeworkbook.author ?????

  7. #7
    Forum Expert oldchippy's Avatar
    Join Date
    02-14-2005
    Location
    Worcester, UK
    MS-Off Ver
    Excel 2007 (Home)
    Posts
    7,097

    Thumbs up

    If you download the sample workbook from http://www.cpearson.com/excel/GetInfo.htm and go to cell B26, change "author" to "company" in the formula and you will see the company name.

    You could also try, "title", "subject", or "manager", etc., but those fields have not been filled in in this particular workbook.

    If you go to File > Properties, fill some out and have a play

    oldchippy

  8. #8
    Registered User
    Join Date
    10-04-2006
    Posts
    4
    I have downloaded the file and done as you suggested and it works in that file
    BUT
    when i try it on a new sheet or in the workbook i want it in it doesnt work
    says #name?

    does the workbook need special setting up

  9. #9
    Forum Expert oldchippy's Avatar
    Join Date
    02-14-2005
    Location
    Worcester, UK
    MS-Off Ver
    Excel 2007 (Home)
    Posts
    7,097
    To get it to work on a new workbook, you have to copy "The Code" from

    Function GetInfo..... down to and including End Function.

    now right click on the small xl icon next to File (top Left), click view code.

    go to Insert > Module, in the Project VBA window you should see Module1

    click on it, then in the large window on the right paste "The Code", then close that window and return to the spreadsheet.

    Now it should work for you once you have filled in the Properties dialog box

    oldchippy

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1