Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default Workbook custom document properties

I would like to know how document properties can be read within Visual Basic
without opening the workbook.

I have a set of workbooks in a folder, but want to open only those that have
a particular value within one of the custom properties.

Thanks,
--
Nigel Barton
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8,520
Default Workbook custom document properties

Hi Nigel

From Visual Basic use the below code to get the document properties. You can
probably loop and check for the files...

Set objXL = CreateObject("Excel.Application")

Set objwb = objXL.Workbooks.Open("c:\1.xls")
MsgBox objwb.BuiltinDocumentProperties("Author")
objwb.Close False

objXL.quit
Set objXL = Nothing
Set objwb = Nothing

The built-in document property names are as follows...
Title
Subject
Author
Keywords
Comments
Template
Last Author
Revision Number
Application Name
Last Print Date
Creation Date
Last Save Time
Total Editing Time
Number of Pages
Number of Words
Number of Characters
Security
Category
Format
Manager
Company
Number of Bytes
Number of Lines
Number of Paragraphs
Number of Slides
Number of Notes
Number of Hidden Slides
Number of Multimedia Clips
Hyperlink Base
Number of Characters (with spaces


If this post helps click Yes
---------------
Jacob Skaria


"Nigel Barton" wrote:

I would like to know how document properties can be read within Visual Basic
without opening the workbook.

I have a set of workbooks in a folder, but want to open only those that have
a particular value within one of the custom properties.

Thanks,
--
Nigel Barton

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
Custom Document Properties JAC Excel Programming 3 October 23rd 08 12:25 AM
dont see custom document properties... Dev Excel Programming 1 November 10th 06 02:42 AM
How can I using Excel custom document properties in the header? ecalvo Excel Worksheet Functions 4 November 3rd 05 09:29 PM
Accessing custom document properties in Word? quartz[_2_] Excel Programming 1 January 19th 05 02:27 AM
Accessing custom document properties Tim Haley Excel Programming 2 September 6th 03 02:34 AM


All times are GMT +1. The time now is 02:27 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"