#1
|
|||
|
|||
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! |
#2
|
||||
|
||||
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] |
#3
|
|||
|
|||
Hi Paul,
The solution you suggested works!! Thanks a lot!! |
Tags |
bookmark, error message, reference |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Bookmark error in TOC when headings replaced | larrylandis01 | Word | 4 | 04-08-2016 04:52 PM |
Reserved error(-1517); there is no message for this error | ktest | Office | 1 | 02-12-2016 08:08 PM |
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 |