It is easy enough to determine whether the selection is in a table and if it is to select one of the cells in that table and set the range to that cell's content. e.g.
Code:
Sub Macro1()
Dim WrdTemplate As Template
Dim objBB As BuildingBlock
Dim WrdRng As Range
Set WrdRng = Selection.Range
If WrdRng.Information(wdWithInTable) = True Then 'the selection is in a table
Set WrdRng = Selection.Cells(1).Range 'the first cell in the selection
WrdRng.End = WrdRng.End - 1 'omit the end of cell character from the range
End If
Set WrdTemplate = Application.Templates("filepath")
Set objBB = WrdTemplate.BuildingBlockTypes(wdTypeCustom1).Categories("Legislation").BuildingBlocks("END")
objBB.Insert WrdRng
Set objBB = Nothing
Set WrdRng = Nothing
Set WrdTemplate = Nothing
End Sub