Visual FoxPro 9调用word 2003 实现邮件合并功能

1. my_word=createobject("word.application")
2. my_word.VISIBLE=.T.
3. my_word.Documents.Open("C:/TMP1.DOC")
4. my_word.ActiveDocument.MailMerge.OpenDataSource("C:/TMP1.DBF")
5. my_word.ActiveDocument.MailMerge.Execute
6. my_word.ActiveDocument.Saveas("C:/NEW_TMP1.DOC")
7. my_word.application.quit
8. my_word=null
9. release my_word

copy to c:/tmp1 type foxpuls && vfp9.0的dbf导入Word邮件合并数据源这种格式才支持。

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
目 录 一、建立WORD应用程序对象,新建、打开、保存WORD文档 5 1、建立对象 5 2、显示WORD窗口 5 3、新建一个WORD文档 5 (1)Count属性 5 (2)Name属性 5 4、打开一个已存在的WORD文档 5 5、激活文档,使文档成为当前激动文档 6 6、保存文档 6 7、页面设置 6 (1)Orientation属性 6 (2)TopMargin属性 6 (3)BottomMargin属性 6 (4)LeftMargin属性 6 (5)RightMargin属性 7 (6)PageWidth属性 7 (7)PageHeight属性 7 8、打印文档 7 9、关闭文档 7 10、退出WORD 8 二、Font对象 8 1、Name 属性 8 2、Size属性 8 3、Bold属性 8 4、Italic属性 8 5、Color属性 8 6、Underline属性 8 7、UnderlineColor属性 8 8、Subscript属性 9 9、Superscript属性 9 10、Spacing属性 9 11、Scaling属性 9 三、Paragraph和Paragraphs集合对象 9 1、添加段落 9 (1) Add方法 10 (2)InsertParagraph方法 10 (3)InsertParagraphAfter 方法 10 (4)InsertParagraphBefore 方法 11 (5)TypeParagraph 方法 11 2、设置段落格式 11 (1)FirstLineIndent属性 11 (2)LeftIndent属性 11 (3)RightIndent属性 11 (4)Alignment属性 11 (5)LineSpacing属性 12 (6)HangingPunctuation属性 12 四、Range 和 Selection 对象 12 (1)Range对象 12 (2)Selection 对象 13 (3)常用属性 13 ①Start属性 13 ②End属性 14 ③Text属性 14 ④Type属性 14 ⑤Information 属性 15 (4)常用方法 18 ①Copy 方法 18 ②Cut 方法 18 ③Paste 方法 18 ④Collapse 方法 18 ⑤InsertBefore 方法 19 ⑥InsertAfter方法 19 ⑦TypeText方法 19 ⑧Delete 方法 20 ⑨移动插入点的方法 20 ㈠Move 方法 20 ㈡MoveDown 方法 20 ㈢MoveEnd 方法 21 ㈣MoveEndUntil 方法 21 ㈤MoveLeft 方法 22 ㈥MoveRight方法 22 ㈦MoveStart 方法 23 ㈧MoveStartUntil 方法 23 ㈨MoveUp 方法 24 五、表格处理 25 1、Table 对象和Tables 集合对象 25 2、添加表格 25 (1)PreferredWidthType 属性 25 (2)AllowAutoFit属性 26 (3)AllowPageBreaks属性 26 3、Border 对象和Borders 集合对象 26 (1)LineStyle属性 26 (2)LineWidth属性 27 (3)Color属性 27 (4)Enable 属性 27 (5)DefaultBorderLineWidth 属性 27 (6)DefaultBorderLineStyle 属性 27 (7)DefaultBorderColor 属性 27 4、Cell 对象和Cells 集合对象 28 5、Row 对象和Rows 集合对象 28 (1)Height 属性 28 (2)Delete 方法 28 (3)SetHeight 方法 28 6、Column 对象和Columns 集合对象 29 (1)Width 属性 29 (2)Delete 方法 29 (3)SetWidth 方法 29 7、合并与拆分单元格 30 (1)合并单元格 30 (2)拆分单元格 30 六、Shape 对象和Shapes 集合对象 32 1、常用方法 32 (1)AddLine 方法 32 (2)AddTextbox 方法 33 (3)AddTextEffect 方法 33 (4)AddPicture 方法 34

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值