A simple enough request from reader Kostas Papadopoulos caused a lot of head-scratching this month. He wanted to create an invoice template that inserted the current date at one point in the document and another, 30 days later, elsewhere. This sounds simple enough using fields and bookmarks, but the problem lies in adding the 30 days. It's easy in Excel - just add 30 and format accordingly. This is not the case in Word, due to the way it stores dates in fields. The first date has to be converted to a Julian date number, the 30-day interval added, then the result converted back to a calendar date. It can be done with fields, but it is complicated. We found an excellent document covering all aspects of manipulating dates in Word at the WOPR site: go to www.wopr.com/ cqi-bin/w3t/showflat.pl?Cat=& Board=wrd&Number=249902 and click the 'Download' link at the left of the message.
展开▼