Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 01-18-2018, 10:34 AM
RMerckling RMerckling is offline Field Codes - IF Statements, IncludeText Automatic Numbering Windows 7 64bit Field Codes - IF Statements, IncludeText Automatic Numbering Office 2010 32bit
Novice
Field Codes - IF Statements, IncludeText Automatic Numbering
 
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
 

Tags
automatic numbering, field code, includetext



Similar Threads
Thread Thread Starter Forum Replies Last Post
odd behaviour with {includetext} field eNGiNe Word 1 10-19-2017 05:57 AM
Field Codes - IF Statements, IncludeText Automatic Numbering VBA Code to search for field codes with certain text before the Field code and to change style welcometocandyland Word VBA 4 02-08-2017 06:53 PM
Field Codes - IF Statements, IncludeText Automatic Numbering FORMTEXT field contained in INCLUDETEXT bookmark emwinschuh Word 1 08-17-2015 08:55 AM
Hyperlinks in an Includetext field do not work. Source and target on SharePoint witwabbit Word 2 11-06-2013 01:06 PM
Formula Field using Field Codes hunter2193 Word 3 04-05-2013 04:58 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 11:13 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