Results 1 to 5 of 5
  1. #1
    Uranium Lounger
    Join Date
    Dec 2000
    Location
    Salt Lake City, Utah, USA
    Posts
    9,508
    Thanks
    0
    Thanked 6 Times in 6 Posts

    BuiltinDocumentProperties('Revision Number') (97 +)

    Under the File, Properties, Statistics tab is "Revision Number:" Can a user get at this? I can't figure out a way to set it except via VBA.

    Sub SetRevNum()
    ThisWorkbook.BuiltinDocumentProperties("Revision Number").Value = 3
    End Sub

    I'm thinking of using this to control template versions, distributed by e-mail, if I can figure out how to do it, by testing for a version number a bit like this (pseudocode, not real world):

    If "Cocuments and Settings" & Application.UserName & _
    "Application DataMicrosoftTemplatesBook1.xlt"_
    .BuiltinDocumentProperties("Revision Number").Value < 3 Then
    ThisWorkbook.SaveAs Filename:= _
    "Cocuments and Settings" & Application.UserName & _
    "Application DataMicrosoftTemplatesBook1.xlt", FileFormat:=xlTemplate, _
    Password:="", WriteResPassword:="", ReadOnlyRecommended:=True, _
    CreateBackup:=False

    All suggestions welcome.
    -John ... I float in liquid gardens
    UTC -7ąDS

  2. #2
    Silver Lounger
    Join Date
    Mar 2001
    Location
    Springfield, Ohio, USA
    Posts
    2,136
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: BuiltinDocumentProperties('Revision Number') (97 +)

    DocProperties are in the Office object model and thus support all of the MS products. Some Office products (ie Word) use the rev number, but Excel does not. It's just laying there, waiting for you to use it via VBA. Ref Q214393. Have fun. --Sam
    <font face="Comic Sans MS">Sam Barrett, CACI </font face=comic>
    <small>And the things that you have heard... commit these to faithful men who will be able to teach others also. 2 Timothy 2:2</small>

  3. #3
    Uranium Lounger
    Join Date
    Dec 2000
    Location
    Salt Lake City, Utah, USA
    Posts
    9,508
    Thanks
    0
    Thanked 6 Times in 6 Posts

    Re: BuiltinDocumentProperties('Revision Number') (97 +)

    Thanks, Sam. In the near future I expect I'll have questions about how to make my pseudocode actually work.
    -John ... I float in liquid gardens
    UTC -7ąDS

  4. #4
    Silver Lounger
    Join Date
    Mar 2001
    Location
    Springfield, Ohio, USA
    Posts
    2,136
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: BuiltinDocumentProperties('Revision Number') (97 +)

    This is one time when I think you'll need to use an On Error. If the property dosn't exist, you will get an error. --Sam
    <font face="Comic Sans MS">Sam Barrett, CACI </font face=comic>
    <small>And the things that you have heard... commit these to faithful men who will be able to teach others also. 2 Timothy 2:2</small>

  5. #5
    Uranium Lounger
    Join Date
    Dec 2000
    Location
    Salt Lake City, Utah, USA
    Posts
    9,508
    Thanks
    0
    Thanked 6 Times in 6 Posts

    Re: BuiltinDocumentProperties('Revision Number') (97 +)

    Yes, it seems that Built-In means "Built-In only after you set a value for the Property"!
    -John ... I float in liquid gardens
    UTC -7ąDS

Posting Permissions

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