View Single Post
 
Old 01-18-2018, 10:34 AM
RMerckling RMerckling is offline Windows 7 64bit Office 2010 32bit
Novice
 
Join Date: Jan 2018
Posts: 29
RMerckling is on a distinguished road
Question Field Codes - IF Statements, IncludeText Automatic Numbering

Hello all,

New to the forums and excited to be a part of the community. I have an issue here I've been scratching my head over for the past week or so, hoping someone can find a solution.

I have a template that I'll be distributing to my team, the template is purely composed of Include Text functions that call from 2 source documents. I can bring in all the data just fine, plenty of IF statements scattered in there to determine which bookmarked fields to bring based on Merge Fields in a Mail Merge.

The issue I'm having is that I cannot find a way to number the sections of the document dynamically. I tried doing if statements for the numbers but it gets too complex later in the document and my Word 2010 just can't handle when I have too many field codes (I think this is due to the source documents being located on a Network Drive?) Originally, I had planned to just code out all the different scenarios and number everything through long IF Statements but that brings editing the code of the document to about 1-2 minutes per character! Impossible for me to finalize it.

Next, I tried to create headers in the source documents and template document that would automatically number the headers... this seems to work but only if I do a basic INCLUDE TEXT function. If I use an IF Statement, the code brings in the bookmarked section just fine, but leaves out the number?

For example:

{ IF "MERGEFIELD Type2" = "Amendment" "{INCLUDETEXT "DocLocation" Bookmark1}" "{INCLUDETEXT "DocLocation" Bookmark2}" }

Results in the correct bookmark being placed... but no number before the header.

While,
{INCLUDETEXT "Document Location" Bookmark1 \* MERGEFORMAT}

Results in the correct bookmark being placed, and a number 2. before the header to signify there's a header above it... which there is... but it receives no visible number?

Then I tried SEQ NumList .... which results in a 1, 2, 3 regardless if it shows in the if statement or not, which is totally useless for this scenario, I need it to only show a number if it is placed in the document, in order.

Can anyone think of a solution, please? I've been working on this template for quite some time now and am really almost there minus this annoyance.

Thank you!
-Rich
Reply With Quote