Hi Jay,
Try:
{={MERGEFIELD field1 }+{ MERGEFIELD field2 } # "Pos;Neg"}
or
{={MERGEFIELD field1 }+{ MERGEFIELD field2 } # "Pos;Neg;Nil"}
Hi Jay,
Try:
{={MERGEFIELD field1 }+{ MERGEFIELD field2 } # "Pos;Neg"}
or
{={MERGEFIELD field1 }+{ MERGEFIELD field2 } # "Pos;Neg;Nil"}
Cheers,
Paul Edstein
[MS MVP - Word]
macropod, both of those work! Thanks.
thanks
Jay
recently discovered Macropod's fantastic Tips & Techniques for Date & Time Manipulation in MS Word.
I had been looking for something similar for a long time - I needed a script to automatically insert a date 30 or 60 days from today to include in my invoice templates. My problem, however, is that Macropod's script works perfectly with a delay of 14 days, as in his example, but when I insert 30 or 60 instead of 14 in the script, I get a date 33 or 68 days from now.
In a private reply, Macropod suggested that the reason might be that the regional date settings in my system (yyyy-MM-dd) are not handling the script correctly.
I attach here a Word file which (on my system at least) shows this phenomenon.
Welcome to Woody's Lounge!
See the screenshot below, it has Field Codes turned on in the View tab of Tools | Options. In your document, you have changed the value 14 in the definition of SET a{ ...} to match the delay, but that's not as it should be. The 14 in this definition is a fixed value. If you change it to 14 again, the field should return the correct dates.
Thanks a lot!! This is the kind of error you make when you don't understand the script...
Hans
Attached is a document I've created to show how to do various mathematical calculations using Word fields, including some possibilities for string testing & manipulation. Topics covered include:
Formula Field Syntax
Formula Field Arithmetic Operators
Formula Field Comparison Operators
Formula Field Functions
Formula Field Logical Functions
. AND And OR: Testing Multiple Logical Numeric Expressions
. Testing Negative Numbers
. Testing Or Returning Text Strings With Logical Functions In Bookmarks
Calculations In Word Forms
Referencing Cells In A Table
. Identifying Cell Addresses
. Referencing Cells Containing Numbers
. Referencing Cells Containing Text
. Reference Operators
. Referencing An Entire Row Or Column
. Referencing Adjacent Cells In A Row Or Column
. Relative Referencing In Tables
. Testing Or Returning Cell Contents In Tables
. Reference Table Cells From Outside The Table
. Referencing Row And Column Totals From Outside A Table
Formatting Numeric Field Results
Rounding Numbers To The Nearest Multiple
Rounding Numbers Up Or Down
Superscripted Ordinal Numbers
Parse Numbers Separated By + Or - Signs
Scientific Notation
Logarithms
Trigonometry
Calculate Horizon Distances Using Word Fields
Financial Calculations
Feedback welcome,
Cheers
Last edited by macropod; 2011-02-02 at 21:55. Reason: Updated Attachment
Cheers,
Paul Edstein
[MS MVP - Word]