#1
|
|||
|
|||
Prevent Field Calculation with Dates from introducing line break?
I have an implementation of Fields and Bookmarks that takes a date, adds some number of days to the date, and displays the new dates. I am taking the days and displaying them mixed in with some language text. I am also taking the resulting dates and attempting to display them with some language text, but the date calculations introduce a line break that I cant seem to get around.
Viewing the attached file will probably be helpful. In the file, the revsubstcomplx fields are the are the new contract end dates (the calculated value), and the scopedaychangedayX fields are the number of days that are being added to the original date. The "phenomenon" can be viewed on the third page - wherein the 1st field results display correctly because they only refer to number of days, the second the same, and the third results demonstrate the problem - where a line break has been introduced by the date reference. Does anyone know how to prevent this date calculation from introducing a line break? Thank you in advance, Macropod |
#2
|
||||
|
||||
Hi ztag,
The problem is caused by some of the dates in your table's 'Rev. Subst. Compl. Date' column having paragraph breaks following them. Those paragraph breaks are included in the bookmarks - which you then refer to on page 3. Delete the extraneous paragraph breaks in the table and everything should be OK. FWIW, depending on whether it outputs nothing or an error message (I haven't tested which), your field on page 3 coded as: { IF CO_number = 1 "revsubstcompl1." { IF CO_number = 2 { "revsubstcompl2" } { IF CO_number = 3 { "revsubstcompl3" } { IF CO_number = 4 { "revsubstcompl4" } { IF CO_number = 5 { "revsubstcompl5" } { IF CO_number = 6 { "revsubstcompl6" } { IF CO_number = 7 { "revsubstcompl7" } { IF CO_number = 8 { "revsubstcompl8" } { If CO_number = 9 { "revsubstcompl9" } { IF CO_number = 10 { "revsubstcompl10" } { IF CO_number = 11 { "revsubstcompl11" } { IF CO_number = 12 { "revsubstcompl12" } { IF CO_number = 13 { "revsubstcompl13" } { IF CO_number = 14 { "revsubstcompl14" } { IF CO_number = 15 { "revsubstcompl15" } { IF CO_number = 16 " { revsubstcompl16 } ." CHECK INPUTS" }}}}}}}}}}}}}}} } could be reduced to: {IF{REF "revsubstcompl{CO_number}" }= "" "CHECK INPUTS" {REF "revsubstcompl{CO_number}"}} or: {IF{REF "revsubstcompl{CO_number}" }= "Error!*" "CHECK INPUTS" {REF "revsubstcompl{CO_number}"}} Similarly, your field coded as: { IF CO_number = 16 { IF { =SIGN({ REF scopechangeday16 }) } = 1 "increased by {=ABS(scopechangeday16)} days." { IF { =SIGN({ REF scopechangeday16 }) } = -1 "decreased by {=ABS(scopechangeday16)} days." "unchanged." } } } could be reduced to: {= scopechangeday16 \# "'increased by '0' day(s)'; 'decreased by '0' day(s)';'unchanged'"}
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Prevent Outlook from adding line breaks | vektor | Outlook | 4 | 02-14-2012 02:16 PM |
Calculation within Cells | manich1 | Excel | 2 | 12-07-2011 02:59 PM |
Help with 'hours worked' calculation... | Snvlsfoal | Excel | 1 | 08-11-2011 05:54 AM |
Mail merge line break | camlad | Mail Merge | 3 | 06-29-2011 05:01 PM |
paragaph hard break, soft break and ...strange break | czomberzdaniela | Word | 2 | 12-03-2010 06:58 PM |