开发者

WordApplication Document add text

开发者 https://www.devze.com 2023-02-25 05:12 出处:网络
How to paste some text to Word document if i have 开发者_如何学运维handle to TWordDocument or _Document?Paste to the Range object of the document:

How to paste some text to Word document if i have 开发者_如何学运维handle to TWordDocument or _Document?


Paste to the Range object of the document:

Document.Range(EmptyParam, EmptyParam).Paste;

or

Word.ActiveDocument.Range(EmptyParam, EmptyParam).Paste;


You can tell where to paste:

var
  R: OleVariant;
..
  R := 20;
  Document.Range(R, R).Paste;
0

精彩评论

暂无评论...
验证码 换一张
取 消