zoukankan      html  css  js  c++  java
  • AX Word操作

    AX Word操作

    发表于2007-11-8 0:30:03

    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"
    */
    }

  • 相关阅读:
    cscope
    C语言
    PMP-------框架
    shell--打开新的.sh文件,直接添加title
    工欲善其事,必先利其器
    同步异步阻塞非阻塞可中断的睡眠不可中断的睡眠
    内核--时间
    没有必要的事情,要学会适当忍让!
    嵌入式开发之CPU的那些事...
    互斥技术----原子变量和自旋锁
  • 原文地址:https://www.cnblogs.com/Fandyx/p/2761440.html
Copyright © 2011-2022 走看看