It ran for me in 2012, renaming Layout1 tab to test in the active drawing.
(and (= (vla-get-taborder l) 1) (vla-put-name l "test"))
Just for my education, why do you use "and" here? I would have used "if". Does the vla-put-name run even if the first half is nil?