微软ERP Dynamics 专业论坛flyday复制地址

微软ERP Dynamics Ax Axapta SL CRM Nav 专业论坛

公告栏
微软ERP Dynamics Ax Axapta SL CRM Nav 专业论坛-秋毫ERP咨询论坛: http://www.QiuHao.com
控制面板
日历
<2008年4月>
SuMoTuWeThFrSa
303112345
6789101112
13141516171819
20212223242526
27282930123
45678910
留言簿(1)
随笔档案
文章档案
微软ERP

void job()
{
    #define.wdLine(5)
    #define.wdCharacter(1)

    COM word = new COM("Word.Application");

    COM documents;
    COM document;
    COM selection;
    str        _filename;
    int        intTmp;
    int k=0;

     ;


    _filename = "d:\\test.doc";

    word.Visible(true);
    word.DisplayAlerts(False);

    Documents = word.Documents();
    Documents.open(_filename);

    selection = word.Selection();
    selection.movedown(#wdLine,4);
    selection.moveleft(#wdCharacter,5);
    selection.typetext("hello");

    selection.MoveRight(#wdCharacter,25);
    selection.typetext("world");

 

/*
    Selection.MoveDown Unit:=wdLine, Count:=4
    Selection.MoveLeft Unit:=wdCharacter, Count:=5
    Selection.TypeText Text:="hello"
    Selection.MoveRight Unit:=wdCharacter, Count:=25
    Selection.TypeText Text:="world"
    Selection.MoveRight Unit:=wdCharacter, Count:=14
    Selection.TypeText Text:="AB"
    Selection.MoveRight Unit:=wdCharacter, Count:=17
    Selection.TypeText Text:="Computer"
    Selection.MoveRight Unit:=wdCharacter, Count:=22
    Selection.TypeText Text:="2007-11-15"
    Selection.MoveRight Unit:=wdCharacter, Count:=13
    Selection.TypeText Text:="asd"
*/
}

作者:秋毫ERP咨询 阅读() 评论()  编辑 发表于:2007-11-08 08:30