Results 1 to 5 of 5
  1. #1
    New Lounger
    Join Date
    Apr 2005
    Location
    Vacaville, California, USA
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Calculated Date (Word 2002)

    Hello,

    As a newbie here, I do hope that I

  2. #2
    Super Moderator
    Join Date
    May 2002
    Location
    Canberra, Australian Capital Territory, Australia
    Posts
    5,054
    Thanks
    2
    Thanked 417 Times in 346 Posts

    Re: Calculated Date (Word 2002)

    Hi Deb,

    Working with the 'Interactively Calculate A Past Or Future Date' example, the first few lines are coded:
    {QUOTE
    {ASK StartDate "What is the starting date, in dd/mm/yyyy format, please?" d {DATE @ "d/MM/yyyy"}}
    {ASK Delay "What is the number of days +/- offset?"}
    "If the starting date is "{StartDate @ "dddd, d
    Cheers,

    Paul Edstein
    [MS MVP - Word]

  3. #3
    New Lounger
    Join Date
    Apr 2005
    Location
    Vacaville, California, USA
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Calculated Date (Word 2002)

    Hi macropod,

    Thank you for your very quick reply. I've been "playing" all evening and I've learned so much!

    I've run into a couple of snags. It's working perfectly within the locked template document, but as soon as I create a NEW document from the template it no longer functions. It doesn't seem to matter if the NEW document is locked or unlocked. Do you have any idea as to what I might be doing wrong? Also, it displays as 3-29-5200 if the 'InitialDate' field is empty. Can I somehow suppress that?

    Quick and hopefully last question...is there a way to format the 'Ref' field to MM/dd/yy? Currently it's displaying MM/dd/yyyy even though the format of the referenced field is MM/dd/yy. I tried playing with format switches without success.

    Thanks, again.

    -deb

  4. #4
    Super Moderator
    Join Date
    May 2002
    Location
    Canberra, Australian Capital Territory, Australia
    Posts
    5,054
    Thanks
    2
    Thanked 417 Times in 346 Posts

    Re: Calculated Date (Word 2002)

    Hi Deb,

    I can directly answer the second part of your query, and perhaps the attached file will answer the other issues.

    To suppress the output when the formfield is empty, change the last line in the field to:
    {IF{StartDate}= " " "" {QUOTE{=dd*10^6+mm*10^4+yy # "00'-'00'-'0000"} @ "MM/dd/yy"}}

    The template in the attached zip file contains two fields - a formfield prompting for the InitialDate, and the calculated field for the later date. It includes the above coding change, but with the suggested replacement of 'StartDate' with 'InitialDate' throughout, and works for me.

    Cheers
    Attached Files Attached Files
    Cheers,

    Paul Edstein
    [MS MVP - Word]

  5. #5
    New Lounger
    Join Date
    Apr 2005
    Location
    Vacaville, California, USA
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Calculated Date (Word 2002)

    You

Posting Permissions

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