Results 1 to 11 of 11
  1. #1
    2 Star Lounger
    Join Date
    Feb 2002
    Location
    Canberra, Australian Capital Territory, Australia
    Posts
    114
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Document Data Entry on Opening Document (W97)

    Hi there,

    Can somebody point me in the direction on where I can find some info on how to set up data entry for a document when opeing a template, ie file number, classification (eg commercial-in-confidence). I have done a brief search, but not had much luck...a few key words or a pointer to an area would be appreciated.

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

    Re: Document Data Entry on Opening Document (W97)

    Do you want the user to enter some data directly in the document, or through a userform? Can the user enter any values, or should they be picked from a list? The more specific you are, the more specific our help can be.

  3. #3
    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: Document Data Entry on Opening Document (W97)

    Word has certain reserved macro names you can use to fire up data collection macros based on the corresponding events: creating a new document from a template (AutoNew), opening an existing document (AutoOpen), etc. Now, when you refer to "opening a template," you fall between the cracks a bit. If you mean "template" in the Word sense of a .DOT file, then it is better to access them through File>New and use AutoNew. However, if someone is opening a "template" in the colloquial sense, and it really is just another document accessed using File>Open, you could use AutoOpen to generate a new document so the original is not overwritten.

    Once you decide how you are going to approach THAT part, Hans has some questions for you about what kinds of dialogs you would like to see and how the information should get stored and/or inserted into the document.

  4. #4
    2 Star Lounger
    Join Date
    Feb 2002
    Location
    Canberra, Australian Capital Territory, Australia
    Posts
    114
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Document Data Entry on Opening Document (W97)

    Thanks Both for providing some feedback,

    What I am after is when opening a document based on a template (ie FIle-New-<template.dot>, therfore an AutoNew style macro I am guessing) . I would like a data entry window (userform) that pops up in the document (not a merging document) so the user can enter data (eg document number, security classification). The data does not need to come from a list but you have me intrigued so an example would be good. I believe that the data that is entered would be linked to a field. I am not sure how complicated this would be, so a pointer to where I could see an example or where I could read about it would be appreciated.

    I hope that is a bit clearer.

  5. #5
    Super Moderator
    Join Date
    Jan 2001
    Location
    Melbourne, Victoria, Australia
    Posts
    3,852
    Thanks
    4
    Thanked 259 Times in 239 Posts

    Re: Document Data Entry on Opening Document (W97)

    Attached is a sample template that shows the userform when a new file is created from the template.
    Attached Files Attached Files
    Andrew Lockton, Chrysalis Design, Melbourne Australia

  6. #6
    2 Star Lounger
    Join Date
    Feb 2002
    Location
    Canberra, Australian Capital Territory, Australia
    Posts
    114
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Document Data Entry on Opening Document (W97)

    Thanks Andrew,

    You have 'guessed' what I was after. After a bit of playing around I have worked out where the user form is and its underlying code (I am afterall just a beginner on this)! This will now give me an opportunity to investigate how to define, insert and (macro) code using your template. Once I work it out, I will use it in my template.

    Interesting prose in the sample template!

    Once again thanks.

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

    Re: Document Data Entry on Opening Document (W97)

    It's a poem, actually: Lochinvar by Sir Walter Scott (1771

  8. #8
    3 Star Lounger
    Join Date
    Jan 2001
    Location
    Canberra, Australian Capital Territory, Australia
    Posts
    339
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Document Data Entry on Opening Document (W97)

    That user form is great.... is there any way of achieving the same sort of thing without code. I know it can be done in word forms because the bookmarks can then be added wherever you like in the document. However I have tried just inserting bookmarks in a document and it seems that the users always seem to select the wrong bit so the bookmark itself is deleted.

    Basically what we want to do is be able to enter a number of pieces of information once and use them throughout the document (buy using insert reference bookmark).

    There are a number of reasons why code is not appropriate including my own skill level and that of the users, macro security settings etc. Also although I know it can be done by code there is no easy way to update the information (if for example it was typed in wrong in the first place) in your user form.

    Can anyone help??

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

    Re: Document Data Entry on Opening Document (W97)

    You can use ASK fields, but again, you run the risk that users inadvertently delete them.
    You can use a protected section with form fields from the Forms toolbar, but this limits what users can do even in unprotected sections. To get around that, you'd need code.
    You can use very simple code to re-display a user form in order to modify the values. See the template attached to <post#=259183>post 259183</post#>. It contains a custom menu option and a keyboard shortcut that activate the user form.

  10. #10
    Platinum Lounger
    Join Date
    Nov 2001
    Location
    Melbourne, Victoria, Australia
    Posts
    5,016
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Document Data Entry on Opening Document (W97)

    <hr>Also although I know it can be done by code there is no easy way to update the information (if for example it was typed in wrong in the first place) in your user form.<hr>
    Hi Karen

    If you've already coded the userform, there's only a very little extra coding required to reshow the form, with its current values, so that the user can make alterations at will, via the same form. It's really just the mirror image of the code that places the userform data into the document.

    Alan

  11. #11
    Super Moderator
    Join Date
    Jan 2001
    Location
    Melbourne, Victoria, Australia
    Posts
    3,852
    Thanks
    4
    Thanked 259 Times in 239 Posts

    Re: Document Data Entry on Opening Document (W97)

    It can be done without code in a relatively robust way if you create unique styles for use only at the data entry point. This is a way of avoiding the 'edits inadvertently delete the bookmark' problem. Because you use a unique style instead of a bookmark, the cross-references then consist of a styleref field instead of the ref field. Users are far less likely to change the style applied to this text than they are to delete the bookmark.

    A modified example of the previous file is attached. You can change the contents of the initial table and then update the fields to see the changes reflected through the document.
    Attached Files Attached Files
    Andrew Lockton, Chrysalis Design, Melbourne Australia

Posting Permissions

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