Looking to rebuild a macro for stretching texts

My old desktop (running 2017 version) had a working VBA macro that I created to isolate all text base items and stretch them 16x wide (height remained the same) and set them to center alignment.  This would not affect curves.  

The hard drive died and I've been trying to recreate this functionality on 2019 using the javascript however it's been difficult.

Here's the Script that I've been working on:

var i;
var data = "Test";
for (i = 1; i < 3; i++) {


if (typeof host.ActiveSelection.type == "number") {
data = typeof host.ActiveSelection
let s1 = host.ActiveLayer.CreateArtisticText(10.515937007874, 6.44105118110236, data);




The stretching seems to be working and the for loop is going through objects (wish I could isolate this to just text).  I don't know how to center justify them either.

Any help would be appreciated.

Thank you,