Results 1 to 6 of 6
  1. #1
    2 Star Lounger
    Join Date
    Jan 2001
    Posts
    117
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Date field code (Word 2000)

    I have a document with a date field that updates automatically. This document is copied to create other documents, although it's not set up (at the moment) as a Word template; it's just a .doc.

    I was asked to modify that date field to one that inserts the current date when the document is created. After that, the date should remain fixed and not update if the file is subsequently opened on another day. To create the document, we are just copying the file, so I can see that I may need to make it into a template so that Word knows the document is being "created." Either way, I don't know how to insert such a date code. Can you help? Thanks!!

    - Linda

  2. #2
    2 Star Lounger
    Join Date
    Jan 2002
    Location
    Putnam Valley, New York, USA
    Posts
    113
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Date field code (Word 2000)

    What you want is the Create Date field code. INSERT, FIELD, CREATEDATE. When you save the file under a new name, and you update the fields, the new date should be inserted. To update quickly, right-click on the date and choose UPDATE FIELD

  3. #3
    2 Star Lounger
    Join Date
    Jan 2001
    Posts
    117
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Date field code (Word 2000)

    This is just what I was looking for--thank you! It looks like I'll have to remember to do a Save As instead of copying the file. Copying the file doesn't seem to change the file creation date.

    Thanks much!

    - Linda

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

    Re: Date field code (Word 2000)

    Hi Linda:
    You could do the following:
    1. Save the document as a template using the {DATE} field.
    2. Macro record the steps of selecting the field (probably by pressing F11), & locking it (Ctrl+F11).
    3. Give the macro the name AutoNew.

    Then, any new document based on the template would have the creation date. However, the field would be locked & wouldn't update. The reason I prefer this method to the CreateDate field is that if it takes 3 days to write the letter, you can unlock the field, update it, & lock it again. I also prefer using a template rather than a document with copy or SaveAs.
    Regards,

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

    Re: Date field code (Word 2000)

    Hi Linda

    One approach I've used in this sort of situation is to include a MACROBUTTON field:
    { MACROBUTTON VerboseDate [Double click this line to insert hard date]}

    The corresponding code used is:
    <pre>Public Sub VerboseDate()
    '
    ' VerboseDate Macro -
    ' Inserts a date at the current insersion point, in the form:
    ' "6th January, 2003"
    ' with the date ordinal formatted in superscript.
    '

    Dim MyDay, MyOrdinal, showdate
    MyDay = Day(Date)

    Select Case MyDay
    Case 1, 21, 31
    MyOrdinal = "st"
    Case 2, 22
    MyOrdinal = "nd"
    Case 3, 23
    MyOrdinal = "rd"
    Case Else ' Other values.
    MyOrdinal = "th"
    End Select

    Selection.TypeText Text:=MyDay

    With Selection.Font
    .Superscript = True
    End With
    Selection.TypeText Text:=MyOrdinal
    With Selection.Font
    .Superscript = False
    End With

    Selection.InsertDateTime DateTimeFormat:=" MMMM, yyyy", _
    InsertAsField:=False

    End Sub</pre>


    It might suit your situation, in some form or other.

    Alan
    Attached Images Attached Images

  6. #6
    2 Star Lounger
    Join Date
    Jan 2001
    Posts
    117
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Date field code (Word 2000)

    These are great ideas. Thank you all very much!

    - Linda

Posting Permissions

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