Results 1 to 8 of 8
  1. #1
    New Lounger
    Join Date
    Sep 2001
    Location
    bay area
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Locked date field code (97SR2)

    Date field codes won't update even tho' the update automatically is selected. This is in a letter template, and must now use CTRL+SHFT+F11 to unlock and then F9 to update. Thanks, -ray

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

    Re: Locked date field code (97SR2)

    It sounds like your template itself contains locked fields. You must open the template itself, not a document based on the template, & unlock the fields & save the template.

    However, when you lock the date field in a template, it should still create documents with the current date...you just can't update them without unlocking the fields. I actually find this convenient as the fields don't update when I look at the document & switch to Print Preview or print a copy.

  3. #3
    Silver Lounger Charles Kenyon's Avatar
    Join Date
    Jan 2001
    Location
    Sun Prairie, Wisconsin, Wisconsin, USA
    Posts
    2,049
    Thanks
    124
    Thanked 119 Times in 116 Posts

    Re: Locked date field code (97SR2)

    You might want to switch the code in your template to a CREATEDATE field instead of a date field. Then leave it unlocked.

    When a new document is created it will put in that document's date. If you want to update it you can either type in a new date or use Save As to save the document (giving it a new creation date even if saved to the same name). Take a look at <A target="_blank" HREF=http://www.addbalance.com/word/datefields1.htm> How can I insert a Date in Word that won't keep changing?</A>.
    Charles Kyle Kenyon
    Madison, Wisconsin

  4. #4
    New Lounger
    Join Date
    Jun 2001
    Location
    Amsterdam, the Netherlands
    Posts
    12
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Locked date field code (Word 7)

    I'm trying to do something similar in Word 7 (Word for Windows 95). I have a template with a CREATEDATE field, but when users use this template to create a new document it doggedly keeps using the date the template was created and not the creation date of the document . Saving the document or locking/unlocking the field doesn't solve the problem. Is there an option I'm missing here? Is it a bug?

    TIA,

    Mark van Bommel

  5. #5
    Silver Lounger Charles Kenyon's Avatar
    Join Date
    Jan 2001
    Location
    Sun Prairie, Wisconsin, Wisconsin, USA
    Posts
    2,049
    Thanks
    124
    Thanked 119 Times in 116 Posts

    Re: Locked date field code (Word 7)

    Hi,

    >I have a template with a CREATEDATE field, but when users use this template to create a new document it doggedly keeps using the date the template was created and not the creation date of the document . Saving the document or locking/unlocking the field doesn't solve the problem.

    How, exactly, are documents based on this template being created? Reading your description leads me to suspect that the template is being opened and someone is using "Save As" to save a copy under a new name, possibly with a .doc extension.

    Please try the following with your template:

    1) Open the template for editing.

    2) Select the CREATEDATE field and unlock it. Make sure that it is a field and not simply the date in text form. You can do this when it is selected by pressing Shift-F9 to toggle the field code. (Toggle it back to showing the date.)

    3) Save and close the template.

    4) Use File => New to create a new document based on your template. Save and close that document. Repen it. What is the date?

    For more information on formatting and using different date fields, you may want to look at <A target="_blank" HREF=http://www.addbalance.com/word/datefields1.htm> How can I insert a Date in Word that won't keep changing?</A>.
    Charles Kyle Kenyon
    Madison, Wisconsin

  6. #6
    New Lounger
    Join Date
    Jun 2001
    Location
    Amsterdam, the Netherlands
    Posts
    12
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Locked date field code (Word 7)

    >How, exactly, are documents based on this template being created?
    >Reading your description leads me to suspect that the template is being opened and
    >someone is using "Save As" to save a copy under a new name, possibly with a .doc extension.

    Well, you're right, the underlying document isn't a Word-template. We use a (rather complex) macro to couple our Word-documents to the addresses in our address application. The macro lets users pick a 'template' and an address. The 'template'-documents are mail-merge-doc's which are merged by the macro with data exported by the address application. The field in the original mail merge document is a real (CREATE)DATE field and it is unlocked. Saving the resulting merged document has no effect, the date stays that of the original mail merge document.

    Am I right in thinking there's no solution if you're not using templates to create the documents? Should I do it in code and if so, how? I can figure out how to get the date in a document, but how do I do this in the resulting merged document, after the merge?

    Or should I create a mail merge field with the date in the macro and merge that with the rest of the data? Problem with that is of course that saving a document later on won't change the date.

    Mmmm, this is more complicated than I thought it would be... Well, that's life ;-)

    Any help would be greatly appriciated,

    Mark van Bommel
    mvanbommel@aidsfonds.nl
    The Netherlands

    also known as

  7. #7
    3 Star Lounger
    Join Date
    Jan 2001
    Location
    Christchurch, New Zealand
    Posts
    250
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Re: Locked date field code (Word 7)

    What about just using Date instead of CreateDate. Date updates everytime you open the document, but you could lock it and provide a macro to unlock and update when necessary.

  8. #8
    New Lounger
    Join Date
    Jun 2001
    Location
    Amsterdam, the Netherlands
    Posts
    12
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Locked date field code (Word 7)

    Hi all,

    I decided to insert the date into the documents by code. Or rather, after Karin's suggestion I decided to have another look at the code and discovered it already contained an option to insert the date. It involves putting a fake field into the mail merge document and replacing that by a date in text format in the macro. Disadvantage is of course that users can only change the date manually but for our purposes that's OK.

    Thanks for all the input and happy holidays!

Posting Permissions

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