Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 03-28-2017, 01:54 AM
lodi123 lodi123 is offline Hide error message from missing bookmark Windows 7 32bit Hide error message from missing bookmark Office 2010 32bit
Novice
Hide error message from missing bookmark
 
Join Date: Feb 2017
Posts: 10
lodi123 is on a distinguished road
Default Hide error message from missing bookmark

Hello,



I'm looking for a solution but I can't find it anywhere.
So
By VBA code I have added a building block to a table om my cover page and another one to the second page. The first building block is a picture with a bookmark included. The cross-reference to this bookmark is in the footer.

In my custom tab I have 2 button, 1 to add the building blocks to the pages and thus the picture to the footer and a second to remove the 2 building blocks from the cover page.

But when I do this, in the footer will appear an error message that the reference source is not found.

I can't just delete the bookmark in case the user wants to add the picture again to the cover page (and footer).

Is there an option to work with IF in the field code? Now it is { REF INT \h \* MERGEFORMAT }

Thank you very much!
Reply With Quote
  #2  
Old 03-28-2017, 03:42 PM
macropod's Avatar
macropod macropod is offline Hide error message from missing bookmark Windows 7 64bit Hide error message from missing bookmark Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,962
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

You could use a field coded as:
{IF{REF INT}= "Error!*" "" { REF INT}}
You probably don't need the \* MERGEFORMAT switch and the \h switch won't work inside another field.

Note: The field brace pairs (i.e. '{ }') for the above example are all created in the document itself, via Ctrl-F9 (Cmd-F9 on a Mac); you can't simply type them or copy & paste them from this message. Nor is it practical to add them via any of the standard Word dialogues.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #3  
Old 03-28-2017, 11:24 PM
lodi123 lodi123 is offline Hide error message from missing bookmark Windows 7 32bit Hide error message from missing bookmark Office 2010 32bit
Novice
Hide error message from missing bookmark
 
Join Date: Feb 2017
Posts: 10
lodi123 is on a distinguished road
Default

Hi Paul,

The solution you suggested works!! Thanks a lot!!
Reply With Quote
Reply

Tags
bookmark, error message, reference

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Hide error message from missing bookmark Bookmark error in TOC when headings replaced larrylandis01 Word 4 04-08-2016 04:52 PM
Hide error message from missing bookmark Reserved error(-1517); there is no message for this error ktest Office 1 02-12-2016 08:08 PM
Hide error message from missing bookmark Automation error Unknown error" message once they open the Excel file hlina Excel 1 10-08-2013 09:14 PM
Email Message Missing in 2003 Word jim_jim Word 0 10-22-2009 02:07 PM
TOC printing Error Bookmark not Defined techexpressinc Word 0 12-14-2008 05:24 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 01:04 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft