Results 1 to 11 of 11
  1. #1
    New Lounger
    Join Date
    Oct 2011
    Location
    Jackson, KY
    Posts
    5
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Post Printing calculated dates in Word

    I have thoroughly enjoyed the solutions for date and time calculations presented by macropod. The solutions are excellent.

    I am experiencing a problem when using date calculations that use the QUOTE, SET sequence that updates a series of dates that are each one month later than the previous date. Everything works great until I go to print the document and then all the dates with the QUOTE, SET sequences all update to the same date, which is the last date in the sequence.

    The sequencing of months was accomplished by incrementing the DELAY variable by one in each date. After this first occurred, I changed one of the variable names from "mm" to "mn" thinking that might be the problem; however, the problem persisted. What suggestions do you have?

  2. #2
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts
    Printing is one of the actions that can trigger an update (recomputation) of field codes. But usually this is for the better, not for the worse. Can you post a sample document demonstrating the problem?

  3. #3
    New Lounger
    Join Date
    Oct 2011
    Location
    Jackson, KY
    Posts
    5
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Red face

    I was aware that fields updated when printing. But, as you mention, I was not expecting this result.

    I have attached a sample document. Please read the note at the bottom of the page which explains how I created the document to show both states.

    Thanks for your attention!
    Attached Files Attached Files

  4. #4
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts
    Quote Originally Posted by swellton View Post
    I have attached a sample document.
    Oh... it's is protected for forms. That explains why Alt+F9 isn't effective.

    In playing with it, I noticed that if I fill in each of the three fields, tabbing to the next as I go, my cursor ends up in the Start date. Then when I use Print Preview, the fields are messed up as in your example. However, if after filling in the three fields I tab an extra time or two so my cursor is not in the Start date, then the problem does not occur. There seems to be something about having the cursor in that form field -- perhaps it is in an editing or indeterminate state for some purposes?? -- that is breaking the field codes in some manner. But I have no idea why that should be.

  5. #5
    New Lounger
    Join Date
    Oct 2011
    Location
    Jackson, KY
    Posts
    5
    Thanks
    1
    Thanked 0 Times in 0 Posts
    Although the form I sent is in protected mode, the password to turn off the protection is null, so you should be able to unprotect the document to see the code.

    It is interesting that in my document, it doesn't matter where I leave the focus, it still changes all the dates to the same date when I do a print preview. However, on at least one occasion, the change in values did not actually occur until I printed the document or left the print preview screen. BTW, I am using Word 2010.

  6. #6
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts
    Using a PDF printer driver, oddly, even when the Preview is incorrect, the printout is correct, as though the fields are previewed in mid-update, but updated again for printing. Strange, but in my case, not a problem. Not sure why yours are not updating correctly.

  7. The Following User Says Thank You to jscher2000 For This Useful Post:

    swellton (2011-10-28)

  8. #7
    New Lounger
    Join Date
    Oct 2011
    Location
    Jackson, KY
    Posts
    5
    Thanks
    1
    Thanked 0 Times in 0 Posts
    I have tried a PDF printer driver, but didn't experience the same result. I will try again when I get back to the Windows machine. Is it possible that the results might vary depending on the PDF driver being used?

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

    What you currently have is a series of date calculation fields all using the same bookmarks and re-calculating from scratch. What you need to do is to either:
    • use different bookmark names for each calculation (a lot of work); or
    • take the kind of approach suggested in the tutorial's 'Calculate a Date Sequence' examples.
    Cheers,

    Paul Edstein
    [MS MVP - Word]

  10. #9
    New Lounger
    Join Date
    Oct 2011
    Location
    Jackson, KY
    Posts
    5
    Thanks
    1
    Thanked 0 Times in 0 Posts
    Hi macropod,

    When I print preview or print the tutorial, "Calculate a Date Sequence", I get the same result as in my series of date calculations: the dates are all the same. For example, when I open the tutorial today and then print preview the document, all the dates under the "Calculate a Date Sequence" display as "Monday, 31 October 2011". I am running Microsoft Office Professional Plus 2010 on Microsoft XP Professional, SP3. When I actually print that page I get the same results. And, when I use a PDF driver as suggest by an earlier post, I get the same results--even when printed.

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

    If that is the case once the fields have been updated, it suggests there's something odd about your setup. Maybe a repair of Word is in order.
    Cheers,

    Paul Edstein
    [MS MVP - Word]

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

    try the attached.
    Attached Files Attached Files
    Cheers,

    Paul Edstein
    [MS MVP - Word]

Posting Permissions

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