D
David Chipping
Hi,
I'm not very experienced in VBA or Word, but I have a problem that I am
unable to solve with nested fields in Word.
For whatever reason (old version of word, client entry incorrectly) we
have a large set of files with IF fields containing nested MERGEFIELDS
that are used for comparison that have a syntax error and Word XP/2003
doesn't accept.
The problem comes from there being no spaces around the comparator,
like:
IF {MERGEFIELD xxx}={MERGEFIELD yyy} ... etc
Applying spaces around the equals gives fixes this; however, I am
unable to do this via VBA, as any addition to the code.text attribute
of the field object results in the nested fields being incorrectly
parsed and included as text elements of the IF field itself.
My question is therefore: how can I edit the code of a field that
contains nested fields and have the nested fields maintained via VBA!
Thanks,
-David
I'm not very experienced in VBA or Word, but I have a problem that I am
unable to solve with nested fields in Word.
For whatever reason (old version of word, client entry incorrectly) we
have a large set of files with IF fields containing nested MERGEFIELDS
that are used for comparison that have a syntax error and Word XP/2003
doesn't accept.
The problem comes from there being no spaces around the comparator,
like:
IF {MERGEFIELD xxx}={MERGEFIELD yyy} ... etc
Applying spaces around the equals gives fixes this; however, I am
unable to do this via VBA, as any addition to the code.text attribute
of the field object results in the nested fields being incorrectly
parsed and included as text elements of the IF field itself.
My question is therefore: how can I edit the code of a field that
contains nested fields and have the nested fields maintained via VBA!
Thanks,
-David