Results 1 to 12 of 12
  1. #1
    3 Star Lounger
    Join Date
    Nov 2002
    Posts
    387
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Disable the Custom properties fields (Word 2000/SR1)

    Attched is a Word doc showing a screen shot of the Properties dialog with the Custom properties tab selected. We wish to disable many of the fields and buttons on this tab but have not found a way to do it. Anyone know?

    Thanks!!

    Jim
    Attached Files Attached Files

  2. #2
    Gold Lounger
    Join Date
    Dec 2000
    Location
    Hollywood (sorta), California, USA
    Posts
    2,759
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Disable the Custom properties fields (Word 2000/SR1)

    You probably already know you can

    Sub FileProperties()
    MsgBox "Feature not enabled."
    End Sub

    ...to disable the whole enchilada.

    I would offer this advice: if you are storing "variable" data in a document, use document variables instead of custom properties.
    DocVars are a lot harder for users to get at -- they'll need code to do it. You can easily write a DocVar Manager for use by
    develpers, etc.
    Kevin <IMG SRC=http://www.wopr.com/w3tuserpics/Kevin_sig.gif alt="Keep the change, ya filthy animal...">
    <img src=/w3timages/blackline.gif width=33% height=2><img src=/w3timages/redline.gif width=33% height=2><img src=/w3timages/blackline.gif width=33% height=2>

  3. #3
    3 Star Lounger
    Join Date
    Nov 2002
    Posts
    387
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Disable the Custom properties fields (Word 2000/SR1)

    Thanks. We will have to look further at the document variables idea. We made use of custom properties because it's UI, and VBA code is the same for Word, Excel, Powerpoint, and Visio so we could make use of the same tech.( we develop apps for all of these)

    Thanks

  4. #4
    3 Star Lounger
    Join Date
    Jul 2001
    Location
    ASKER, Norway
    Posts
    277
    Thanks
    6
    Thanked 0 Times in 0 Posts

    Re: Disable the Custom properties fields (Word 2000/SR1)

    Hi,

    I'm using CustomProperties myself; placing them on the document (as a Field Code) to get them displayed /printed... So this is interesting!

    If variables are better:
    How is it possible to make variables being stored in the document such that they can be placed in the document the next time I open the document?

    I have earlier used bookmarks, but it is not very flexible, e.g. when Track Changes are used and when new sections are added to the document witch has reference to my template.dot.

    Regards
    Bj

  5. #5
    Uranium Lounger
    Join Date
    Dec 2000
    Location
    Los Angeles Area, California, USA
    Posts
    7,453
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Disable the Custom properties fields (Word 200

    Once you have defined a Document Variable, use the field:

    {DocVariable "Document Variable Name goes here"}

    to display the doc variable. The curly brackets are inserted, of course, with Ctrl+F9. Chris Woodman has an add-in that both lets you copy shortcut keys & organize, create, & modify doc variables easily. You can find it here.
    Hope this helps,

  6. #6
    Gold Lounger
    Join Date
    Dec 2000
    Location
    Hollywood (sorta), California, USA
    Posts
    2,759
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Disable the Custom properties fields (Word 2000/SR1)

    Besides Phil's helpful comments, I would add this:

    If the docvar has no value assigned, Word displays a nasty error message sure to turn smiles to frowns.
    Therefore, you have to handle the issue of "I want the docvar in the document even if it has no value" v.
    "I don't want a document full of this: Error! No document variable supplied."

    One solution is to load up "empty" docvars with a space or two. In my applications, if the docvar is empty
    it is not necessary so a clean up method removes all the empty docvars.
    Kevin <IMG SRC=http://www.wopr.com/w3tuserpics/Kevin_sig.gif alt="Keep the change, ya filthy animal...">
    <img src=/w3timages/blackline.gif width=33% height=2><img src=/w3timages/redline.gif width=33% height=2><img src=/w3timages/blackline.gif width=33% height=2>

  7. #7
    3 Star Lounger
    Join Date
    Jul 2001
    Location
    ASKER, Norway
    Posts
    277
    Thanks
    6
    Thanked 0 Times in 0 Posts

    Re: Disable the Custom properties fields (Word 200

    Thanks a lot Phil!

    I have looked at your link and in the The ShortCut Organizer description I found the following text:
    "Be sure, however, not to put a Document Variable field (available in Word 2000) into a header or footer: it causes Word to hang!"

    I use among several this one: ActiveDocument.CustomDocumentProperties("DOCVERSIO N"). This is inserted into the document in the header and when the proper macro runs the version number is places/printed on the document. So I do not understand the text quoted above. My Word do not hang. (???) or am I not understanding you correctly?

    Regards
    Bj

  8. #8
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts

    Re: Disable the Custom properties fields (Word 2000/SR1)

    As a footnote to Kevin's post, there always is the option to use IF... here's one I built recently; it looks for some text in a particular style and displays the word Name if the STYLEREF field returns either of two errors:

    { if { STYLEREF zName * MERGEFORMAT } = "Error! No text of specified style in document." "Name" { IF { STYLEREF zName * MERGEFORMAT } = "Error! Style not defined." "Name" { STYLEREF zName * MERGEFORMAT } * MERGEFORMAT } }

    Your error message(s) may vary!

  9. #9
    3 Star Lounger
    Join Date
    Jul 2001
    Location
    ASKER, Norway
    Posts
    277
    Thanks
    6
    Thanked 0 Times in 0 Posts

    Re: Disable the Custom properties fields (Word 200

    Thanks Phil,

    OK.. ..

    To be sure I understand: The custom or built-in properties I refer to I insert in the document as fields, am I talking about the same thing?Regards
    Bj

  10. #10
    Uranium Lounger
    Join Date
    Dec 2000
    Location
    Los Angeles Area, California, USA
    Posts
    7,453
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Disable the Custom properties fields (Word 200

    Hi Bjorn:
    There is a difference between the DocProperty field, which can be used to access built-in document properties or custom document properties, and Doc Variables. I was talking about the latter. The Chris Woodman add-in deals with the latter. Take a look under Insert/Field to see the difference between the two fields. You can also look under File/Properties & look on the custom tab for Doc Properties.
    Hope this helps,

  11. #11
    Uranium Lounger
    Join Date
    Dec 2000
    Location
    Los Angeles Area, California, USA
    Posts
    7,453
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Disable the Custom properties fields (Word 200

    <P ID="edit" class=small>(Edited by Phil Rabichow on 30-Oct-03 08:58. to add the update)</P>My Word 2000 doesn't hang either, although I haven't use DocVariables extensively.. I forgot about that warning. Maybe you should test it for awhile. I wrote to Chris to see if the information is just stale or perhaps one of the services releases fixed the problem. We'll see.

    Update: Chris Woodman contacted me & he agrees that Word 2000 no longer hangs when a Doc variable is put in the header/footer. He will check Word 97 & then update his site.

  12. #12
    3 Star Lounger
    Join Date
    Jul 2001
    Location
    ASKER, Norway
    Posts
    277
    Thanks
    6
    Thanked 0 Times in 0 Posts

    Re: Disable the Custom properties fields (Word 200

    Thanks Phil,

    One learn something every day!

    Soon I will be starting to learn VB.NET and that may give me more knowledge. I have understood that VB.NET will take over from VB (VBA) in a very fee years (months?) time.

    Have a nice week end.

    Bj

Posting Permissions

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