Results 1 to 6 of 6

Thread: File Properties.

  1. #1

    Thread Starter
    Member
    Join Date
    Jan 2005
    Posts
    41

    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

  2. #2
    Fanatic Member Psyrus's Avatar
    Join Date
    Jul 2000
    Location
    NJ
    Posts
    602

    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.
    Chris

    VB 6.0 Calendar App Video Gamers Group
    Don't forget to rate people if they helped you.

  3. #3

    Thread Starter
    Member
    Join Date
    Jan 2005
    Posts
    41

    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.

  4. #4
    Fanatic Member Psyrus's Avatar
    Join Date
    Jul 2000
    Location
    NJ
    Posts
    602

    Re: File Properties.

    I am not sure what the max limit is, but this is how you add it in code:
    VB Code:
    1. CustomDocumentProperties.Add Name:="Department", LinkToContent:=False, Type:=msoPropertyTypeString, Value:="Department One"
    Chris

    VB 6.0 Calendar App Video Gamers Group
    Don't forget to rate people if they helped you.

  5. #5

    Thread Starter
    Member
    Join Date
    Jan 2005
    Posts
    41

    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.

  6. #6
    Fanatic Member Psyrus's Avatar
    Join Date
    Jul 2000
    Location
    NJ
    Posts
    602

    Re: File Properties.

    It's part of the file itself.
    Chris

    VB 6.0 Calendar App Video Gamers Group
    Don't forget to rate people if they helped you.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width