Referencing
this comment, you could do something like this to align the table to the center:
Code:
var X = myTable.MakeTags().replace(/^\<table/, "<table alignment=center");
On a side note, leading is measured in 10th's of a point so if you're wanting the paragraph tag to have a leading of 1 point, it should be altered to be:
Code:
X += "<p leading=10> ";