Apps Script公式リファレンス: Apps Script Reference |障害・課題追跡: IssueTracker |Google Workspace: Status Dashboard - Summary


Google Slidesの表内の文字を太字にしたい - Bold the text in a table in Google Slides

Google Slidesで、現在選択している表の特定セル内にあるテキストを太字にしようと試したコードです。
I tried to bold text within a specific cell of the currently selected table in Google Slides.

In this example, the text in the second row, second column of the table will be bolded.

The text to be bolded this time

Trying to use Google Apps Script to bold a targeted cell in a table in Google Slides.

Manually, you can select the text within the cell and click the "B" icon at the top to bold it.

Apps Script
function boldCellText() {
const table = getSelectedTable();
const row = 1;
const col = 1;
const cell = table.getCell(row, col);
const textRange = cell.getText();

function getSelectedTable() {
const presentation = SlidesApp.getActivePresentation();
const selection = presentation.getSelection();
const pageElement = selection.getPageElementRange().getPageElements()[0];
const table = pageElement.asTable();
return table;

In this example, a 3-row, 2-column table is prepared on the slide, and a value is placed in the cell at row 2, column 2.

Select the table and run replaceValue() in, and the text in the cell will be bolded.


Class TextStyle > setBold(bold) 

Latest post

Google Apps Scriptの障害時はIssueTrackerを見てみる - Incidents for Apps Script are reported on Issue Tracker

IssueTracker > Apps Script issues Google Apps Scriptの障害時は IssueTracker に課題が上がっていることが...