Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 08-23-2018, 12:33 PM
Cosmo Cosmo is offline Field Code: Show a value only if bookmark is not empty Windows Vista Field Code: Show a value only if bookmark is not empty Office 2007
Competent Performer
Field Code: Show a value only if bookmark is not empty
 
Join Date: Mar 2012
Posts: 240
Cosmo is on a distinguished road
Default Field Code: Show a value only if bookmark is not empty


I rarely have to delve into the pain that is MS Word Field Codes, and whenever I do, I end up pulling my hair out.

I need to have show a value ONLY if a bookmark is NOT empty.

I tried using a COMPARE, but it only seems to work if I specify the EXACT value (e.g. "Test"). If I compare it to an empty string (""), it doesn't work. The following code:

{COMPARE{REF TestBookmark} = "Test"}

gives me a result of 1 if 'TestBookmark' does equal "Test". But if I try to use the following:

{COMPARE{REF TestBookmark} = ""}

I always get a 0 result.

Is there any way to tell if a Bookmark is empty?

What I'm looking for is something like this:

{IF{={COMPARE{REF TestBookmark} = ""} > 0} "Bookmark Is Empty" "Bookmark Is NOT Empty"}
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
Bookmark will not show/hide based on CC Checkbox lord_kaiser Word VBA 1 04-17-2018 01:19 AM
loop code until the first empty row altina Excel Programming 0 03-24-2017 06:49 PM
Field Code: Show a value only if bookmark is not empty 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
Find Bookmark, move to bookmark, execute code, repeat raymm3852 Word VBA 10 04-15-2016 06:21 PM
Field Code: Show a value only if bookmark is not empty Delete Line of Bookmark if the Text is Empty ljg713 Word VBA 1 12-21-2015 04:27 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 10:40 AM.


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