我正在使用 Delphi 2010 自动创建一些文档。
在我的布局中,我需要在 Word 表格单元格 (1, 1) 中插入一行文本,然后移动到下一行,更改段落设置,并插入水平线
我可以设置表格和第一行内容,但我一生无法弄清楚如何将光标移动到单元格的第二行,或插入水平线
到目前为止我所拥有的:
tbl.Cell(1, 1).Range.Text := s;
with tbl.Cell(1, 1).Range do
begin
Font.Name := '+Headings';
Font.Size := 14;
Font.Bold := -1;
Font.AllCaps := -1;
ParagraphFormat.LineSpacingRule := wdLineSpaceAtLeast;
ParagraphFormat.LineSpacing := 12;
ParagraphFormat.SpaceAfter := 0;
ParagraphFormat.SpaceBefore := 0;
end;
tbl.Cell(1, 1).Range.InsertParagraphAfter;
我什至无法为水平线创建宏(必须是精确的大小和重量),因为 Word 2010 中的 VBA 不会通过右键单击记录...