请问有没有Delphi导出的word的相关组件和用法简介,有的话请不吝赐教.
还有用Qreport相关组件,如何实现一串文字按自定义分行打印?

解决方案 »

  1.   

    有的www.fecit.com.cn/download/delphi%207gjyykf.zip
      

  2.   

    看看这里,挺详细的http://www.pconline.com.cn/pcedu/empolder/gj/delphi/0401/293407.html
      

  3.   

    免费使用
    免费升级超越水晶报表,是我们的目标
    彻底解除程序员负担,极大提高用户设定灵活性
    LLanV报表工具,经过了10000行以上数据的压力测试,性能优良!其中一部分功能如下:  
    1.支持资料卡(比如:个人简历),表单(比如:销售定单),报表(比如:销售月报表)的预览打印
    2.不用任何设定,就可以默认产生专业的页面
    3.用户可以一次性设定企业标准样式(比如:公司标志,台头)
    4.支持文本,线条,方框,图片,等报表元素
    5.对各报表元素和报表区域等提供丰富的属性
    6.用户可以在运行期间编辑文本,线条,方框,图片,明细列, 操作简单
    7.支持同一列相同数据合并成一个格
    8.可以在运行期间增删,调换明细列
    9.提供多种报表风格
    10.支持页合计,总计
    11.支持的套打报表
    12.支持MIS开发的各种开发工具:如VC、VB、Delphi等
    13.可以直接连接数据库
    14.用户可以把设定后的报表样式保存为报表样式文件
    15.报表头和报表尾均可多于一页
    16.报表样式文件格式完全开放
    17.可以实现中国式复杂报表样式
    18.无须编程请发EMAIL给[email protected]
      

  4.   

    读取和显示Word文档的VCL控件:
    http://www.ksdev.com/vcl/index.html
    http://vcl.vclxx.org/DELPHI/D32FREE/DATA2WRD.ZIP最近接触了一个用户的案例,用delphi控制word做一个合同管理程序。办公人员先根据业务需要,写好合同的文字,但在用户名称、产品名称等变化的位置填写指定的标记字符串,然后通过delphi把数据库中的实际数据替换掉word中的文字,最后让word打印出合同。 delphi自带了一个简单的word例题,但功能太简单。通过查找vba的说明,再对照delphi的vcl,编写了如下代码,实现了基本的公文管理功能。 启动word时用如下代码: 
    begin
    try 
    wordapplication.connect; 
    except 
    messagedlg('word may not be installed', mterror, [mbok], 0); 
    abort; 
    end; 
    wordapplication.visible := true; 
    wordapplication.caption := 'delphi automation'; 
    end; 关闭word用如下代码。如果想保存doc文件,请修改savechanges变量的内容: 
    var 
    savechanges, originalformat, routedocument: olevariant; 
    begin 
    savechanges := wddonotsavechanges; 
    originalformat := unassigned; 
    routedocument := unassigned; 
    try 
    wordapplication.quit(savechanges, originalformat, routedocument); 
    wordapplication.disconnect; 
    except 
    on e: exception do 
    begin 
    showmessage(e.message); 
    wordapplication.disconnect; 
    end; 
    end; 
    end; 让word打开一个指定的文件,需要先放置opendialog,然后调用wordapplication.documents.open: 
    var 
    itemindex :olevariant; 
    filename, confirmconversions, readonly, addtorecentfiles, 
    passworddocument, passwordtemplate, revert, 
    writepassworddocument, writepasswordtemplate, format: olevariant; 
    begin 
    if not dlgopen.execute then 
    exit; {open document} 
    filename := dlgopen.filename; 
    confirmconversions := false; 
    readonly := false; 
    addtorecentfiles := false; 
    passworddocument := ''; 
    passwordtemplate := ''; 
    revert := true; 
    writepassworddocument := ''; 
    writepasswordtemplate := ''; 
    format := wdopenformatdocument; wordapplication.documents.open( filename, confirmconversions, 
    readonly, addtorecentfiles, passworddocument, passwordtemplate, 
    revert, writepassworddocument, writepasswordtemplate, format ); {assign worddocument component} 
    itemindex := 1; 
    worddocument.connectto(wordapplication.documents.item(itemindex)); {turn spell checking of because it takes a long time if enabled and slows down winword} 
    wordapplication.options.checkspellingasyoutype := false; 
    wordapplication.options.checkgrammarasyoutype := false; 
    end; 让word替换标记字符串要使用worddocument.range.find.execute,这里用delphi替换了<#name>: 
    var 
    findtext, matchcase, matchwholeword, matchwildcards, matchsoundslike, 
    matchallwordforms, forward, wrap, format, replacewith, replace: olevariant; 
    begin 
    findtext := '<#name>'; 
    matchcase := false; 
    matchwholeword := true; 
    matchwildcards := false; 
    matchsoundslike := false; 
    matchallwordforms := false; 
    forward := true; 
    wrap := wdfindcontinue; 
    format := false; 
    replacewith := 'delphi'; 
    replace := true; worddocument.range.find.execute( findtext, matchcase, matchwholeword, 
    matchwildcards, matchsoundslike, matchallwordforms, forward, 
    wrap, format, replacewith, replace ); end; 上面这4段代码完成了公文管理的基本功能,再把它和数据库结合起来,就可以开发一个与lotus notes类似的产品了。