Andreas Hermle
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.BuildingBlo ckEntries( "MS_BackCo ver").Inse rt Where:= _
Selection.Range, RichText:=True
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.BuildingBlo
Selection.Range, RichText:=True
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
great, this did the trick, thank you very much for your great help. I really appreciate it.
Regards, Andreas