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!
|