Skip to main content

[Migrated content. Thread originally posted on 25 October 2005]

When using windows explorer I can bring up the properties of a file and view the extended properties such as Title, Subject, Author, Keywords, etc.

Does anybody know how I can set these properties on a file from a COBOL program using the windows API or an active-X control. I have a look at the Shell32.dll API and could see how to extract details of the properties but not set them.

Any pointers appreciated.

[Migrated content. Thread originally posted on 25 October 2005]

When using windows explorer I can bring up the properties of a file and view the extended properties such as Title, Subject, Author, Keywords, etc.

Does anybody know how I can set these properties on a file from a COBOL program using the windows API or an active-X control. I have a look at the Shell32.dll API and could see how to extract details of the properties but not set them.

Any pointers appreciated.
You made me curious, any chance you would tell me what you use for getting the info? That might help me find an answer for you.

[Migrated content. Thread originally posted on 25 October 2005]

When using windows explorer I can bring up the properties of a file and view the extended properties such as Title, Subject, Author, Keywords, etc.

Does anybody know how I can set these properties on a file from a COBOL program using the windows API or an active-X control. I have a look at the Shell32.dll API and could see how to extract details of the properties but not set them.

Any pointers appreciated.
It is probably not the answer you hoped for :-( But it is in fact the answer:
The additional properties you see are provided by the property sheet handlers. How they again store the information is not good to say, but perhaps you can find your answer here:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/shellcc/platform/shell/programmersguide/shell_int/shell_int_extending/extensionhandlers/propsheethandlers.asp

[Migrated content. Thread originally posted on 25 October 2005]

When using windows explorer I can bring up the properties of a file and view the extended properties such as Title, Subject, Author, Keywords, etc.

Does anybody know how I can set these properties on a file from a COBOL program using the windows API or an active-X control. I have a look at the Shell32.dll API and could see how to extract details of the properties but not set them.

Any pointers appreciated.
Within our application we generate PDF, Spreadsheets etc using Crystal Reports. Crystal does not seem to allow you to set the extended properties on files that it exports.

I am currently developing a ASP.NET web portal around our application, and one thing I want to show are reports that have been generated. It does this by looking at files in certain directories and rather than just show a filename such as REP20051025-00001a.pdf I would like to add things like the report title, the username that generated the file, etc as part of the web page. Clicking on the report title will then stream the file down from the data server into the appropriate application on the users local machine.

The extended properties seem an ideal way to do this. I have managed to develop (read that as copy from the web) some C# code that returns the extended properties.

[Migrated content. Thread originally posted on 25 October 2005]

When using windows explorer I can bring up the properties of a file and view the extended properties such as Title, Subject, Author, Keywords, etc.

Does anybody know how I can set these properties on a file from a COBOL program using the windows API or an active-X control. I have a look at the Shell32.dll API and could see how to extract details of the properties but not set them.

Any pointers appreciated.
If you could email me the C# code I might get a clue. Interesting topic, really.