没有合适的资源?快使用搜索试试~ 我知道了~
delphi操作word基类
5星 · 超过95%的资源 需积分: 28 30 下载量 28 浏览量
2013-12-25
15:28:05
上传
评论
收藏 12KB TXT 举报
温馨提示
试读
18页
用delphi编程操作WORD的一个基类,实现了插入表格,图片,文字等常用操作,功能很全面,是学习DELPHI操作WORD很好的例子
资源推荐
资源详情
资源评论
unit utMyword;
(*
By 闫磊 编写 2004.09.06 Email:landgis@126.com yanleigis@21cn.com
*)
interface
uses word2000, ActiveX, Variants, Dialogs, SysUtils;
type
TMyWord = class(TObject)
private
FWord: TWordApplication; //word对象
FDoc: TWordDocument; //文档对象
procedure connectword();
public
//换行
procedure AddReturn();
//设置字体
procedure SetFont(FontName: string; FontSize: Integer;
FontBold: Boolean = False; FontUnderline: Boolean = False);
//插入表格
function AddTable(Col, Row: Integer): Table;
//设置背景色
procedure SetTableBack(BackColor: ToleEnum);
//鼠标下移
procedure MoveDown(num: Integer = 1);
//选择下移
procedure SelectDown(num: Integer = 1);
//鼠标上移
procedure Moveup();
//鼠标右移
procedure MoveRight(num: Integer = 1);
(*
By 闫磊 编写 2004.09.06 Email:landgis@126.com yanleigis@21cn.com
*)
interface
uses word2000, ActiveX, Variants, Dialogs, SysUtils;
type
TMyWord = class(TObject)
private
FWord: TWordApplication; //word对象
FDoc: TWordDocument; //文档对象
procedure connectword();
public
//换行
procedure AddReturn();
//设置字体
procedure SetFont(FontName: string; FontSize: Integer;
FontBold: Boolean = False; FontUnderline: Boolean = False);
//插入表格
function AddTable(Col, Row: Integer): Table;
//设置背景色
procedure SetTableBack(BackColor: ToleEnum);
//鼠标下移
procedure MoveDown(num: Integer = 1);
//选择下移
procedure SelectDown(num: Integer = 1);
//鼠标上移
procedure Moveup();
//鼠标右移
procedure MoveRight(num: Integer = 1);
//选择右移
procedure SelectRight(num: Integer = 1);
//写字
procedure WriteText(Text: string);
//按样式插入一行记录
//如AddLine "备注","正文"
//AddLine 'kk',"标题 1"
procedure AddLine(S: string; PStyle: olevariant);
procedure AlignLine(Align: ToleEnum);
//插入分页符
procedure insertPage();
//插入插入页码
procedure insertPagenum();
//插入日期
procedure insertDate();
//设置表格一列宽度
procedure SetTable(PTable: Table; ColumnIdx: Integer; Width: Integer);
//设置表格一列高度
procedure SetTableheight(PTable: Table; RowIdx: Integer; height:
Integer);
//插入目录
procedure InsertContents();
//创立书签
procedure createBookMark(BookMarkName: string);
//移动到标签
procedure GotoBookMark(BookMarkName: string);
//粘贴
procedure paste();
//替换
procedure Replace(Source, Target: string);
procedure SelectRight(num: Integer = 1);
//写字
procedure WriteText(Text: string);
//按样式插入一行记录
//如AddLine "备注","正文"
//AddLine 'kk',"标题 1"
procedure AddLine(S: string; PStyle: olevariant);
procedure AlignLine(Align: ToleEnum);
//插入分页符
procedure insertPage();
//插入插入页码
procedure insertPagenum();
//插入日期
procedure insertDate();
//设置表格一列宽度
procedure SetTable(PTable: Table; ColumnIdx: Integer; Width: Integer);
//设置表格一列高度
procedure SetTableheight(PTable: Table; RowIdx: Integer; height:
Integer);
//插入目录
procedure InsertContents();
//创立书签
procedure createBookMark(BookMarkName: string);
//移动到标签
procedure GotoBookMark(BookMarkName: string);
//粘贴
procedure paste();
//替换
procedure Replace(Source, Target: string);
剩余17页未读,继续阅读
资源评论
- NYQ7102017-07-22文本文件而已,不是demo一类的.
- linsiyu2016-10-12文本文件而已,不是demo一类的.
darkwang
- 粉丝: 0
- 资源: 4
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功