• Prompting for Custom Doc Properties using a form (2000)

    Home » Forums » AskWoody support » Productivity software by function » MS Word and word processing help » Prompting for Custom Doc Properties using a form (2000)

    Author
    Topic
    #389612

    Hi All,

    I have been using some custom Word templates for quite a while that make use of some custom document properties. Naturally, the standard procedure is to go into File, Properties and Custom to make the necessary changes for each new use of the template. I can’t stand that “interface” for making the changes to the custom properties! How can I create a custom form (actually, that part I think I can handle) that ‘programmatically’ updates the custom property fields? I’d like to create a form that contains all the required custom fields in straight-forward tab-stopped text boxes. I hate having to select the property, type the changes into the value cell and then click Modify! That’s just plain stupid. I have about 15 custom fields. What I’d like is a form with all fields defined as text boxes and ONE ‘Apply’ button. Can’t seem to locate any reference within Word’s help files to doing this.

    Your help would be most appreciated!!

    Drew

    Viewing 1 reply thread
    Author
    Replies
    • #688766

      You can create a UserForm in the Visual Basic Editor; load the values of the document properties in the Initialize event of the UserForm, and save them in the On Click event of the OK button. I ahve attached a very simple example; if you want it to be flexible, you’d need to do more work.

      Note: you must have set macro security to medium (or low), for you won’t be able to show the UserForm if macro security is set to high.

      • #688921

        Thanks for your help. That was just what I needed to get started. I did have some problems in running your sample doc, but it was security related. I finally figured it out.

        Thanks again!!

        Drew

        • #690041

          (Edited by Gary Frieder on 29-Jun-03 23:44. Edited code to reflect that it can accommodate up to 15 properties (previously had it set to 12).)

          Drew, Hans:

          This sounded like something worth having; here’s a fleshed-out custom userform taking in your ideas.
          Notes:

          – Userform is currently set up to accommodate up to 15 custom document properties.
          – The userform resizes automatically depending on the number of custom doc props.
          – The

    • #688866

      (Edited by Phil Rabichow on 25-Jun-03 17:55. to add correction)

      If you don’t mind using Doc Variables, instead of Doc Properties, Chris Woodman created an add-in called Shortorg.dot. It’s primarily for organizing keyboard shortcuts using an Organizer (the way Word allows modules, styles, toolbars, & autotext to be copied). However, it puts a command on the file menu for creating & modifying Doc variables on the fly. I havent’ checked recently but I got it at http://www.chriswoodman.co.uk/Shortcut Organizer.htm[/url]
      Cheers,
      ——–
      Whoops! Just checked & the URL isn’t any good.

    Viewing 1 reply thread
    Reply To: Prompting for Custom Doc Properties using a form (2000)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: