全國最多中醫師線上諮詢網站-台灣中醫網
發文 回覆 瀏覽次數:1878
推到 Plurk!
推到 Facebook!

用OLE連結WORD

 
領航天使
站長


發表:12216
回覆:4186
積分:4084
註冊:2001-07-25

發送簡訊給我
#1 引用回覆 回覆 發表時間:2002-03-03 19:49:55 IP:192.168.xxx.xxx 未訂閱
Excel OLEprocedure MSTest;
var    MsWord:Variant;
begin
      MSWord := CreateOleObject('Word.Application');
          FD := 'c:/test.doc';
          CopyFile(Pchar(FS),PChar(FD),False);
          MSWord.Documents.Open(FD);
          MSWord.Application.Visible := True;
    if MSWord.ActiveDocument.Bookmarks.Exists(l) then
    begin
      MsWord.ActiveDocument.Bookmarks.Item(l).Select;
      if d = '' then d := ' ';
      MsWord.Selection.TypeText(d);
    end;              MSWord.ActiveDocument.SaveAs(FD);
          if ComboBox2.Items.IndexOf(ComboBox2.Text) <> -1 then
            MSWord.ActivePrinter := ComboBox2.Text;                MSWord.ActiveDocument.PrintOut;
            MSWord.ActiveDocument.Close;
            MSWord.ActiveDocument.PrintPreview;
        MSWord.Quit;
end;
------
~~~Delphi K.Top討論區站長~~~
系統時間:2024-09-19 10:33:40
聯絡我們 | Delphi K.Top討論版
本站聲明
1. 本論壇為無營利行為之開放平台,所有文章都是由網友自行張貼,如牽涉到法律糾紛一切與本站無關。
2. 假如網友發表之內容涉及侵權,而損及您的利益,請立即通知版主刪除。
3. 請勿批評中華民國元首及政府或批評各政黨,是藍是綠本站無權干涉,但這裡不是政治性論壇!