Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Logic to suppress text if a bookmark is null in Word 2007 template

Posted on 2012-04-13
4
Medium Priority
?
246 Views
Last Modified: 2012-04-25
I have a word 2007 template and on it I print a bookmark field called Line custom form field 4 which is a contract number.  I have included text “Contract #:” which precedes the bookmark.
          i.e.: (Contract #:  bookmark)
The problem is there is not always a contract number but the text “Contract #:” still prints out with nothing to the right of it.
Is there a way to suppress the text if the bookmark is null?
I tried an if statement that I found online (microsofts website) but all it did was print out my entire statement as text.  
          {If {Line custom form field 4} = “” “” “Contract# :”}
I’m sure the syntax is wrong but can’t seem to find anything on how to do this.
0
Comment
Question by:debobrien
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
4 Comments
 
LVL 31

Expert Comment

by:Helen Feddema
ID: 37843941
In the code that creates a new document from the template, look at the Contract # value, and if it is Null or empty, delete that line from the document.
0
 

Author Comment

by:debobrien
ID: 37844127
Where is that code?  These templates are created through an ERP software package's document printing function. When I create a document, I just tell it I want to use Word options and it creates a blank template and provides the bookmarks for all the available db fields I can use on the template.  (See attached).

I was hoping I could code something right on or within the template like I can with an Access form.
0
 

Accepted Solution

by:
debobrien earned 0 total points
ID: 37873601
Since I cannot change any code from the software vendor which creates the template, the software vendor has offered a solution to include the data in a separate table in the template.
0
 

Author Closing Comment

by:debobrien
ID: 37890952
A usable solution was not offered here.
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The canonical version of this article is on my web site here: http://iconoun.com/articles/collisions/ A companion presentation is available here: http://iconoun.com/articles/collisions/Unicode_Presentation.pdf
Deploying a Microsoft Access application in a Citrix environment is not difficult but takes a few steps. However, Citrix system people are often of little help, as they typically know next to nothing about Access. The script provided here will take …
Viewers will learn the different options available in the Backstage view in Excel 2013.
The viewer will learn how to use the =DISCRINV command to create a discrete random variable, use this command to model a set of probabilities and outcomes in a Monte Carlo simulation, and learn how to find the standard deviation of a set of probabil…

618 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question