delphi操作word的某行文字 如居中,左对齐
如下面这段代码 如何实现richedit2.text在导入word后首行居中 或者左靠?var
word:variant;
word:=createoleobject('word.application');
Word.Documents.Open(extractfilepath(Application.ExeName)+'\test.doc',false);
word.visible:=true;
word.activedocument.range(0,0);
word.activedocument.range.insertafter(richedit2.Text);
word.activedocument.range.insertafter(richedit1.Text);