To further clarify, there are three cross reference situations with three different results using both my code and macropod's code:
Situation #1: cross reference within conditional text pointing to a heading within conditional text - result is unlinked text that is not the correct heading number.
Situation #2: cross reference within conditional text pointing to a heading NOT within conditional text - result is unlinked text that IS properly the correct heading number (but cannot be updated).
Situation 3#: cross reference NOT in conditional text pointing to a heading NOT within conditional text - result is field is not unlinked - still exists in document and can be updated properly - the desired result.
As you can see, we don't get the desired result when using cross references within IF fields - so maybe the question is whether anyone knows for sure that you can or cannot get cross references to work properly within IF fields (or somehow be able to unlink the IF field WITHOUT unlinking the REF field contained within it).
|