Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 07-24-2015, 06:05 AM
Cosmo Cosmo is offline Need help with Field Codes Windows Vista Need help with Field Codes Office 2007
Competent Performer
Need help with Field Codes
 
Join Date: Mar 2012
Posts: 240
Cosmo is on a distinguished road
Default


Ok, I think I am starting to understand better now. The IF field code(and any embedded field codes within the IF) is converted, but other field codes are not. So if I had a field code which had an embedded IF field code, The IF would be converted, but the parent field code would still be editable?

Wherever I would use an 'IF [condition]', I can convert it to a formula as you have posted for mail merge? Does this work in a normal document that isn't being used for a mail merge?
Reply With Quote
  #2  
Old 07-24-2015, 06:21 AM
macropod's Avatar
macropod macropod is offline Need help with Field Codes Windows 7 64bit Need help with Field Codes Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,467
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Quote:
Originally Posted by Cosmo View Post
Ok, I think I am starting to understand better now. The IF field code(and any embedded field codes within the IF) is converted, but other field codes are not. So if I had a field code which had an embedded IF field code, The IF would be converted, but the parent field code would still be editable?
That depends on what else the parent field is contained in. If it's contained in a QUOTE field, for example, the whole lot gets converted.
Quote:
Originally Posted by Cosmo View Post
Wherever I would use an 'IF [condition]', I can convert it to a formula as you have posted for mail merge? Does this work in a normal document that isn't being used for a mail merge?
Whether a formula field can be used in a given situation depends on what you're trying to do. Most of the things you'd want to test can have their results expressed numerically, so that's not a major concern.

The field code I provided works because the condition being tested can have its results expressed numerically and, therefore, the numeric picture switches that can be used to format numbers can be coerced into providing the required output. Numeric picture switches cater for +ve, -ve and 0 values to be formatted differently.

As you can imagine, things can start getting complicated when there are more than three possible outcomes...

The same field construction will work in an ordinary document; the difference being that nothing inside a QUOTE field or IF field gets converted to its results. That's an important limitation because it means tests of volatile values, such as dates, don't become fixed the way they would with a mailmerge. That, in turn, could give invalid results on another day, for example.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #3  
Old 07-24-2015, 07:21 AM
Cosmo Cosmo is offline Need help with Field Codes Windows Vista Need help with Field Codes Office 2007
Competent Performer
Need help with Field Codes
 
Join Date: Mar 2012
Posts: 240
Cosmo is on a distinguished road
Default

Quote:
Originally Posted by macropod View Post
That depends on what else the parent field is contained in. If it's contained in a QUOTE field, for example, the whole lot gets converted.

Whether a formula field can be used in a given situation depends on what you're trying to do. Most of the things you'd want to test can have their results expressed numerically, so that's not a major concern.

The field code I provided works because the condition being tested can have its results expressed numerically and, therefore, the numeric picture switches that can be used to format numbers can be coerced into providing the required output. Numeric picture switches cater for +ve, -ve and 0 values to be formatted differently.

As you can imagine, things can start getting complicated when there are more than three possible outcomes...

The same field construction will work in an ordinary document; the difference being that nothing inside a QUOTE field or IF field gets converted to its results. That's an important limitation because it means tests of volatile values, such as dates, don't become fixed the way they would with a mailmerge. That, in turn, could give invalid results on another day, for example.
Ok, thanks. Things can get quite complicated and confusing pretty fast. I believe I may have enough information to hopefully get where I need to for this project, after some testing and a little trial and error (or a little trial and a lot of error). I may have a few more questions in the next few days as I get into the details.

Thanks again, your input is greatly appreciated.
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Copying Raw Field Codes ptmuldoon Word 3 01-04-2015 02:50 PM
Need help with Field Codes How to hide field codes from others? lucky16 Word VBA 2 10-24-2014 03:52 AM
VBA script to update field codes? Calab Word VBA 1 04-07-2014 09:27 PM
Formula Field using Field Codes hunter2193 Word 3 04-05-2013 04:58 AM
Need help with Field Codes Word Equation field codes mkarthic Word 1 12-02-2011 02:09 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 07:46 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft