Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default Programmatically updating document properties of closed file

I would like to programmatically update the document properties of a
closed file as part of a home made doc mgmt tool. I was reading the
great instructions from Chip Pearson (http://www.cpearson.com/excel/
docprop.htm). But as I understand the case this solution is not fit
for Office 2007 or later documents. Obviously it will be mainly these
type of documents I will work with. Is there any way to do it also for
Office 2007 and later documents? Thanks for any support!
//Thomas
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,514
Default Programmatically updating document properties of closed file

thomas häger pretended :
I would like to programmatically update the document properties of a
closed file as part of a home made doc mgmt tool. I was reading the
great instructions from Chip Pearson (http://www.cpearson.com/excel/
docprop.htm). But as I understand the case this solution is not fit
for Office 2007 or later documents. Obviously it will be mainly these
type of documents I will work with. Is there any way to do it also for
Office 2007 and later documents? Thanks for any support!
//Thomas


I'm not sure where you get the idea Chip's solution is not for MSO2007
(or later) docs. His solution implements working directly with the
built-in properties (or user-defined properties) supported by MSO apps.
While some properties are app-specific, there is a multitude of
available properties that all MSO apps share.

Note that the user-defined properties are also referred to as *custom
properties*, but these should not be confused with the custom
properties that were associated with the NTFS file system from WinNT up
to WinXP. (The NTFS file system custom properties are not supported as
of Vista)

--
Garry

Free usenet access at http://www.eternal-september.org
ClassicVB Users Regroup!
comp.lang.basic.visual.misc
microsoft.public.vb.general.discussion


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default Programmatically updating document properties of closed file

On 11 Okt, 23:38, GS wrote:
thomas häger pretended :

I would like to programmatically update the document properties of a
closed file as part of a home made doc mgmt tool. I was reading the
great instructions from Chip Pearson (http://www.cpearson.com/excel/
docprop.htm). But as I understand the case this solution is not fit
for Office 2007 or later documents. Obviously it will be mainly these
type of documents I will work with. Is there any way to do it also for
Office 2007 and later documents? Thanks for any support!
//Thomas


I'm not sure where you get the idea Chip's solution is not for MSO2007
(or later) docs. His solution implements working directly with the
built-in properties (or user-defined properties) supported by MSO apps.
While some properties are app-specific, there is a multitude of
available properties that all MSO apps share.

Note that the user-defined properties are also referred to as *custom
properties*, but these should not be confused with the custom
properties that were associated with the NTFS file system from WinNT up
to WinXP. (The NTFS file system custom properties are not supported as
of Vista)

--
Garry

Free usenet access athttp://www.eternal-september.org
ClassicVB Users Regroup!
* * comp.lang.basic.visual.misc
* * microsoft.public.vb.general.discussion


That's great news!
I misinterpreted Chips comment "NOTE: The DSO OLE Document Property
Reader does NOT parse properties out of Office 2007 and later files,
since these are not OLE files."

Now when I am confident the components are fit for the job I can focus
on getting my code working all together!

Thanks for straiting that out!
//Thomas
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,514
Default Programmatically updating document properties of closed file

You're welcome! Always glad to be of help when I can...

--
Garry

Free usenet access at http://www.eternal-september.org
ClassicVB Users Regroup!
comp.lang.basic.visual.misc
microsoft.public.vb.general.discussion


  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default Programmatically updating document properties of closed file

On 12 Okt, 19:01, GS wrote:
You're welcome! Always glad to be of help when I can...

--
Garry

Free usenet access athttp://www.eternal-september.org
ClassicVB Users Regroup!
* * comp.lang.basic.visual.misc
* * microsoft.public.vb.general.discussion


Things has worked out quite well but there are still some headache
left. I am successful to update the Summary Properties like "Author",
"Keywords" etc. But when it comes to the "Content Type" and "Content
Status" I run into trouble. I would really like to use these fileds
since it seems there is a tight restriction when it comes to which
fields actually shows their content in the overview in Windows
Explorer. This seems to be limited to the Summary Properties. Whitout
Content Type and Content Summary I'm simply running a bit short on
fields. It seems these fields behave like summary fields as they
present their content in the overview in Explorer and in the details
pane. The following is how I call Chips' procedure (which works great
for the other fields):

If Not IsNull(ReadPropertyFromClosedFile(mFilePath, "Content status",
PropertyLocationBoth)) Then
MyFileDate = ReadPropertyFromClosedFile(mFilePath, "Content
status", PropertyLocationBoth)
End If

I have also tried with different spellings and wrappings of the field
name but without success.

Very happy for any insights on this!


  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,514
Default Programmatically updating document properties of closed file

thomas häger formulated on Tuesday :
On 12 Okt, 19:01, GS wrote:
You're welcome! Always glad to be of help when I can...

--
Garry

Free usenet access athttp://www.eternal-september.org
ClassicVB Users Regroup!
* * comp.lang.basic.visual.misc
* * microsoft.public.vb.general.discussion


Things has worked out quite well but there are still some headache
left. I am successful to update the Summary Properties like "Author",
"Keywords" etc. But when it comes to the "Content Type" and "Content
Status" I run into trouble. I would really like to use these fileds
since it seems there is a tight restriction when it comes to which
fields actually shows their content in the overview in Windows
Explorer. This seems to be limited to the Summary Properties. Whitout
Content Type and Content Summary I'm simply running a bit short on
fields. It seems these fields behave like summary fields as they
present their content in the overview in Explorer and in the details
pane. The following is how I call Chips' procedure (which works great
for the other fields):

If Not IsNull(ReadPropertyFromClosedFile(mFilePath, "Content status",
PropertyLocationBoth)) Then
MyFileDate = ReadPropertyFromClosedFile(mFilePath, "Content
status", PropertyLocationBoth)
End If

I have also tried with different spellings and wrappings of the field
name but without success.

Very happy for any insights on this!


Thomas,
I haven't used Chip's component and so can't advise you per se. It
seems to me, though, that you're using it correctly. I suggest listing
all the properties (and their respective values) so you can see what
VBA returns. I expect you can do this using his
*WritePropertiesToRange()* function, however the file must be open.

You can also iterate the property sets returned by DsoFile.dll (using a
For Each loop) if you want to see the BuiltInDocumentProperties and/or
the CustomDocumentProperties (if any exist). This doesn't require the
file to be open in Excel.

--
Garry

Free usenet access at http://www.eternal-september.org
ClassicVB Users Regroup!
comp.lang.basic.visual.misc
microsoft.public.vb.general.discussion


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
Accessing Custom Doc Properties on Closed File Barb Reinhardt Excel Programming 14 July 20th 07 02:00 PM
How to Read File Properties Programmatically Chaplain Doug Excel Programming 1 November 1st 06 04:39 PM
Modify File Creation date in VBA using Document properties Peter Rooney Excel Programming 7 March 9th 06 12:33 PM
Get the properties from a closed file ericsson Excel Programming 2 December 9th 04 12:10 PM
accessing custom document properties without loading file [email protected] Excel Programming 2 September 30th 04 01:47 AM


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