• Date fields (Word 2k)

    Author
    Topic
    #374014

    I am setting up schedules for a full week on a single page. Is it possible to put a date field in each day that when you bring it up it will put the proper date in each day, and if so how is it done? Everything I do in word I have learned on my own or with the odd tip from you wonderful people out there. I really appreciate the help.

    Viewing 0 reply threads
    Author
    Replies
    • #603383

      Stan,

      See if the attached helps. Word doesn’t have a built-in formula for calculating date offsets, so you’ve got to roll your own. This is mine, with a set of examples showing how to get it to do something along the lines of what you’ve asked for based on the current document’s ‘saved’ date.

      Cheers

      PS: Charles Kenyon has some variations on this theme at http://www.addbalance.com/word/

      Cheers,
      Paul Edstein
      [Fmr MS MVP - Word]

      • #603787

        I’m sorry. I don’t know anything about this stuff. I don’t see any instructions on how to set something like this up. I don’t have a clue.

        • #603789

          Stan,

          I take it that you extracted the Word document (Dates.doc) from the zip file that I attached to my last message and opened it in Word. In there is a discussion of the issue, with a calculated date sitting in a centered paragraph on its own, followed by some more explanation and another 7 centered paragraphs, each with just a calculated date.

          The calculated dates referred to are all in form fields. If select the whole of any of the dates concerned and right-click on them, you can expand or update the form field. Expanding any of them reveals the rather extensive coding that’s needed to calculate future/past dates. The first expression is “QUOTE”, and the second expression is ‘SET Delay #’, where # is a number. That number tells the code how many days forward of back from the ‘key’ date to work from.

          For the first instance of the calculated date paragraphs in Dates.doc, the date will be today. For all the other 7, it’s whatever date the file is saved on. You may need to save the file then update the fields to get them to recalculate correctly.

          Hope this helps.

          Cheers,
          Paul Edstein
          [Fmr MS MVP - Word]

          • #603806

            This helps clear things up a little. But, what do I do with these 8 fields. I am only using a workweek schedule, so do I paste the single instance in the first cell and the next 4 in the next cells? Told you I don’t know a thing about this, but slowly I’m learning.

            • #603810

              Hi Stan,

              I’m assuming your document has 7 fields – one for each day of the week, and that the dates are required for the week starting today. With the set of 7 consecutive date fields I gave you, copy the first one into the field that’s going to be the first day of the period, copy the second one into the field that’s going to be the second day of the period, and so on.

              If the dates are required for the week ending today, you’ll need to prefix the day for the 2nd – 7th days with a minus sign (-).

              Save the document, next press Ctrl-A, to select the whole document, then F9 to update all the fields, then save again. From now on, the fields will update every time you re-open the document or do a print preview or print.

              Let me know how you get on.

              PS: If you want the dates in Month, Day, Year order, you can change the order of the last three expressions in each field (ReplyDay, ReplyMonth, ReplyYear), but keeping the same arrangement of quotes and non-breaking spaces between them. Similarly, you can change the month from ‘MMMM’ to ‘MMM’, ‘MM’ or ‘M’ if you want the shorter month forms.

              Cheers,
              Paul Edstein
              [Fmr MS MVP - Word]

    Viewing 0 reply threads
    Reply To: Date fields (Word 2k)

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

    Your information: