View Single Post
  #1   Report Post  
JBS66 JBS66 is offline
Junior Member
 
Posts: 0
Default MergeField w/ 62 IF statements

I'm using Word 2013 to populate a letter that uses the field merge function, with my trouble field having about 62 nested IF statements and a couple INCLUDETEXT functions in each IF statement. If it isn't obvious what the problem is already, when i try to start the merge, it gives me the error that the "Fields are too deeply nested" and the form doesn't merge the proper paragraph.
Basically there are 62 different cases that require a different paragraph be inserted depending on what the variable "ctname" is holding, and each case calls the INCLUDETEXT function to extract the paragraph from the document and inserts in into the document.
Anyone have any suggestions on how to simplify this process to not have 62 nested IF statements? I looked to the VBA Case selection function, but that's not supported for the fieldmerge of word.
I tried to copy and paste my entire block of arguments into this, but it doesn't copy over correctly. It only copies what the results of the merge would be and not the fields arguments... So if anyone needs to see the example I can take a screenshot of it and post it.
Thanks in advance for any suggestions you have.