Results 1 to 6 of 6
  1. #1
    Star Lounger
    Join Date
    Feb 2001
    Location
    Ontario, Canada
    Posts
    80
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Prompting for Custom Doc Properties using a form (2000)

    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

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Prompting for Custom Doc Properties using a form (2000)

    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.
    Attached Files Attached Files

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

    Re: Prompting for Custom Doc Properties using a fo

    <P ID="edit" class=small>(Edited by Phil Rabichow on 25-Jun-03 17:55. to add correction)</P>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
    Cheers,
    --------
    Whoops! Just checked & the URL isn't any good.

  4. #4
    Star Lounger
    Join Date
    Feb 2001
    Location
    Ontario, Canada
    Posts
    80
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Prompting for Custom Doc Properties using a form (2000)

    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

  5. #5
    Super Moderator
    Join Date
    Dec 2000
    Location
    New York, NY
    Posts
    2,970
    Thanks
    3
    Thanked 29 Times in 27 Posts

    Re: Prompting for Custom Doc Properties using a form (2000)

    <P ID="edit" class=small>(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).)</P>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
    Attached Files Attached Files

  6. #6
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Prompting for Custom Doc Properties using a form (2000)

    Very nice, Gary. Thanks!

Posting Permissions

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