|
-
Apr 12th, 2005, 12:05 PM
#1
Thread Starter
Member
File Properties.
Here it is gang,
Maybe this doesn't belong in this forum, but I was wondering how can I modify a files properties? For example ... when a user saves a new copy of my VBA application (excel) the department value is set to "MY DEPARTMENT". That way when anyone right clicks on the file and goes to the properties ... the department value is "MY DEPARTMENT".
Also ... where is that data stored?
I know this is kind of confusing, but lets see where this one goes.
Thanks.
Kid Coke
-
Apr 12th, 2005, 12:41 PM
#2
Fanatic Member
Re: File Properties.
CustomDocumentProperties. You can access the value of each like this:
CustomDocumentProperties.Item("Department")
CustomDocumentProperties("Department")
Last edited by Psyrus; Apr 12th, 2005 at 07:20 PM.
-
Apr 12th, 2005, 12:56 PM
#3
Thread Starter
Member
Re: File Properties.
Psyrus,
Thanks for the information.
So I can use that code in a button click event? Can I add as many file properties as I like?
Thanks.
-
Apr 12th, 2005, 07:37 PM
#4
Fanatic Member
Re: File Properties.
I am not sure what the max limit is, but this is how you add it in code:
VB Code:
CustomDocumentProperties.Add Name:="Department", LinkToContent:=False, Type:=msoPropertyTypeString, Value:="Department One"
-
Apr 12th, 2005, 09:42 PM
#5
Thread Starter
Member
Re: File Properties.
Nice ... This is turning out to be a very cool project.
Now ... here is the question ... Where is that information actually stored? Is it in some table (a la FAT32) .. or is it part of the file itself ...
Any info would be appreciated.
-
Apr 13th, 2005, 04:13 AM
#6
Fanatic Member
Re: File Properties.
It's part of the file itself.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|