Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,355
Default Retrieving custom document properties - Excel 2007


--
HTH,
Barb Reinhardt

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,355
Default Retrieving custom document properties - Excel 2007

Here's the rest of my message.

I've used VBA in Excel 2003 to retrieve Custom document properties and it
works well. However, when I'm testing my file in 2007, it gets held up here

Set objDocProperties = CreateObject("DSOFile.OleDocumentProperties")

I've got the reference set for DSO OLE Document Properties reader 2.1
within the VBE

In this KB article ( http://support.microsoft.com/kb/224351 ) it states
that it should work if I have the compatibility pack installed. Every time I
open EXcel 2007 it shows COMPATIBILITY mode at the top, so I have to assume
it's there.

Can someone assist? I use this macro once a month to pull data for an
operations review and there is no way I can go back to doing it manually.

Thanks,

Barb Reinhardt


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,718
Default Retrieving custom document properties - Excel 2007

Every time I open EXcel 2007 it shows COMPATIBILITY mode at the top, so I
have to assume it's there.


Compatibility mode is different that the Compatibility Pack. If you have
the later installed you can open Excel 2007 files (XLSX, etc.) in Excel
2003. If in doubt try to install it again.

--
Jim
"Barb Reinhardt" wrote in message
...
| Here's the rest of my message.
|
| I've used VBA in Excel 2003 to retrieve Custom document properties and it
| works well. However, when I'm testing my file in 2007, it gets held up
here
|
| Set objDocProperties = CreateObject("DSOFile.OleDocumentProperties")
|
| I've got the reference set for DSO OLE Document Properties reader 2.1
| within the VBE
|
| In this KB article ( http://support.microsoft.com/kb/224351 ) it states
| that it should work if I have the compatibility pack installed. Every
time I
| open EXcel 2007 it shows COMPATIBILITY mode at the top, so I have to
assume
| it's there.
|
| Can someone assist? I use this macro once a month to pull data for an
| operations review and there is no way I can go back to doing it manually.
|
| Thanks,
|
| Barb Reinhardt
|
|


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,355
Default Retrieving custom document properties - Excel 2007

I get Runtime error 429. ActiveX component can't create object

Barb Reinhardt



"Chip Pearson" wrote:

The following works for me. If you have a reference set to the DSO 2.1
library, you can explicitly declare the variable rather than using
CreateObject.

Dim DSO As DSOFile.OleDocumentProperties
Set DSO = New DSOFile.OleDocumentProperties
DSO.Open "C:\Books.xls"
Debug.Print DSO.CustomProperties("TestProp")
Debug.Print DSO.SummaryProperties.Author
DSO.Close

With CreateObject, use

Dim DSO As Object
Set DSO = CreateObject("DSOFile.OleDocumentProperties")
DSO.Open "C:\Books.xls"
Debug.Print DSO.CustomProperties("TestProp")
Debug.Print DSO.SummaryProperties.Author
DSO.Close

What error do you get (or do you just get no property values) when you run
the code in 2007?


--
Cordially,
Chip Pearson
Microsoft Most Valuable Professional
Excel Product Group
Pearson Software Consulting, LLC
www.cpearson.com
(email on web site)





"Barb Reinhardt" wrote in message
...
Here's the rest of my message.

I've used VBA in Excel 2003 to retrieve Custom document properties and it
works well. However, when I'm testing my file in 2007, it gets held up
here

Set objDocProperties = CreateObject("DSOFile.OleDocumentProperties")

I've got the reference set for DSO OLE Document Properties reader 2.1
within the VBE

In this KB article ( http://support.microsoft.com/kb/224351 ) it states
that it should work if I have the compatibility pack installed. Every
time I
open EXcel 2007 it shows COMPATIBILITY mode at the top, so I have to
assume
it's there.

Can someone assist? I use this macro once a month to pull data for an
operations review and there is no way I can go back to doing it manually.

Thanks,

Barb Reinhardt



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
How do I embed SharePoint document properties in Excel 2007? Phil Ny Excel Discussion (Misc queries) 4 April 7th 23 12:15 PM
Document Properties for Office 2007 Excel Templates Zement Excel Discussion (Misc queries) 4 July 3rd 07 08:20 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 Tim Haley Excel Programming 2 September 6th 03 02:34 AM


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