Mantenha tudo organizado com as coleções
Salve e categorize o conteúdo com base nas suas preferências.
HorizontalAlignment
Uma enumeração dos tipos de alinhamento horizontal compatíveis.
Para chamar um tipo enumerado, você chama a classe, o nome e a propriedade pai dele. Por exemplo,
DocumentApp.HorizontalAlignment.LEFT.
Use a enumeração HorizontalAlignment para manipular o alinhamento do conteúdo de Paragraph.
var body = DocumentApp.getActiveDocument().getBody();
// Insert a paragraph and a table at the start of document.
var par1 = body.insertParagraph(0, "Center");
var table = body.insertTable(1, [['Left', 'Right']]);
var par2 = table.getCell(0, 0).getChild(0).asParagraph();
var par3 = table.getCell(0, 0).getChild(0).asParagraph();
// Center align the first paragraph.
par1.setAlignment(DocumentApp.HorizontalAlignment.CENTER);
// Left align the first cell.
par2.setAlignment(DocumentApp.HorizontalAlignment.LEFT);
// Right align the second cell.
par3.setAlignment(DocumentApp.HorizontalAlignment.RIGHT);