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

怎樣去使用這個參數

尚未結案
totodog
一般會員


發表:13
回覆:3
積分:3
註冊:2003-05-29

發送簡訊給我
#1 引用回覆 回覆 發表時間:2003-06-04 10:01:27 IP:203.204.xxx.xxx 未訂閱
各位Delphi先進: 小弟我利用了物件盤上server選項中的TWordDocument這個物件 其物件其中有一個方法為SaveAs 程序如下 procedure SaveAs(var FileName: OleVariant; var FileFormat: OleVariant); 然後FileFormat這參數的說明如下: FileFormat Optional Variant. The format in which the document is saved. Can be one of the following WdSaveFormat constants: wdFormatDocument, wdFormatDOSText, wdFormatDOSTextLineBreaks, wdFormatRTF, wdFormatTemplate, wdFormatText, wdFormatTextLineBreaks, or wdFormatUnicodeText. To save a document in another format, specify the appropriate value for the SaveFormat property of the FileConverter object. 請問 如果我要把FileFormat存成wdFormatText 或是其他種類的格式 我該怎樣使用且定義這參數阿?? 因為我不知道參數為OleVariant要怎樣使用 各位先盡如果懂得 可以舉個例子讓我了解怎樣使用嗎 謝謝大家
Justmade
版主


發表:94
回覆:1934
積分:2030
註冊:2003-03-12

發送簡訊給我
#2 引用回覆 回覆 發表時間:2003-06-04 11:23:43 IP:218.16.xxx.xxx 未訂閱
我沒用過,不過你可以試試這樣成不成 :
procedure TForm1.Button1Click(Sender: TObject);
var
  ov1,ov2 : OLEVariant;
begin
  ov1 := 'abc.txt';
  ov2 := wdFormatText;
  W.SaveAs(ov1,ov2);
end;
turboted
版主


發表:95
回覆:754
積分:452
註冊:2002-07-23

發送簡訊給我
#3 引用回覆 回覆 發表時間:2003-06-04 11:47:00 IP:218.166.xxx.xxx 未訂閱
這裏有幾個實用的sample 讓您參考看看 http://www.blong.com/Conferences/DCon99/VCLSourcery/VCLSourcery.htm http://www.blong.com/Conferences/DCon99/FAQs/FAQs.htm http://www.delphi-treff.de/content/tutorials/automationkurs/index.php4?kat=3 發表人 - turboted 於 2003/06/04 11:49:22
系統時間:2024-04-28 5:39:52
聯絡我們 | Delphi K.Top討論版
本站聲明
1. 本論壇為無營利行為之開放平台,所有文章都是由網友自行張貼,如牽涉到法律糾紛一切與本站無關。
2. 假如網友發表之內容涉及侵權,而損及您的利益,請立即通知版主刪除。
3. 請勿批評中華民國元首及政府或批評各政黨,是藍是綠本站無權干涉,但這裡不是政治性論壇!