I'm new to docx and am trying to remove the first line when adding a new paragraph to a table cell.
from docx import Document
from docx.shared import Pt
document.add_heading().add_run('HEADING').font.name = 'Calibri'
a = document.add_table(1, 2, style= 'Table Grid')
a_cells = a.rows[0].cells
a1 = a_cells[0].add_paragraph()
a1 = a1.add_run('NAME').font
a1.bold = True
a1.name = 'Calibri'
a1.size = Pt(14)
NAME will be printed on the second line. I can use:
a1 = a_cells[0].text = 'NAME'
instead of add_paragraph but I can't add bold format.
So is there a way to either; remove the first line of add_paragraph or format .text to bold?