You'll have to add some LISP to your script, e.g. (remove the comments marked in green):
Code:
;; Get a VLAX handle to the document
(setq doc (vla-get-ActiveDocument (vlax-get-acad-object)))
;; Get the collection of Layouts
(setq tabs (vla-get-Layouts doc))
;; Step through each layout
(vlax-for tab tabs
;; Check if not Model tab
(if (not (vla-get-Name tab) "Model")
(progn
(setvar "CTAB" (vla-get-Name tab)) ;Open current tab
(command "_ERASE" (ssget "x" '((0 . "INSERT") (2 . "OldBlockName"))) "") ;Command to erase old TB
(command ".-INSERT" "c:\\Path\\NewBlockName.DWG" "0,0" "" "" "");Command to insert new
(command "_ZOOM" "_Extents")
)
)
)
TILEMODE 1
ZOOM E
QSAVE