Link to home
Start Free TrialLog in
Avatar of Andreas Hermle
Andreas HermleFlag for Germany

asked on

Check the existence of a building block by means of VBA

Dear Experts:

this is a snippet from a macro I regularly run:

If the Building Block Entry cannot be found (ie. does not exist), I get an error message that I am trapping with a user-defined message box.

Is it possible to check right right at the beginning of the macro whether this building block exists in the first place and if not, the macro exits right away telling so with a msgbox.

Help is much appreciated. Thank you very much in advance.

Regards, Andreas

NormalTemplate.BuildingBlockEntries("MS_BackCover").Insert Where:= _
        Selection.Range, RichText:=True
ASKER CERTIFIED SOLUTION
Avatar of Rgonzo1971
Rgonzo1971

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Andreas Hermle

ASKER

Hi Rgonzo,

great, this did the trick, thank you very much for your great help. I really appreciate it.

Regards, Andreas