請問有沒有方法於開啟Word後, 把部份部的功能關閉, 如SaveAs的功能 |
尚未結案
|
naposhao
初階會員 ![]() ![]() 發表:18 回覆:38 積分:31 註冊:2002-10-13 發送簡訊給我 |
|
hagar
版主 ![]() ![]() ![]() ![]() ![]() ![]() 發表:143 回覆:4056 積分:4445 註冊:2002-04-14 發送簡訊給我 |
http://groups.google.com.tw/groups?hl=zh-TW&lr=&ie=UTF-8&inlang=zh-TW&th=fafcb8e442c1af9c&rnum=1
var Btn, OleTrue: OleVariant; begin Btn := Word.CommandBars['Standard'].Controls['Print']; Btn.Visible := False; Btn.Enabled := False; //You can also delete buttons and menuitems, like this: OleTrue := True; Word.CommandBars['Standard'].Controls['Print']. Delete(OleTrue); Word.CommandBars['File'].Controls['Print...']. Delete(OleTrue); end;--- Everything I say is a lie. --<-<-<@ |
naposhao
初階會員 ![]() ![]() 發表:18 回覆:38 積分:31 註冊:2002-10-13 發送簡訊給我 |
|
saydo
一般會員 ![]() ![]() 發表:0 回覆:9 積分:1 註冊:2004-01-05 發送簡訊給我 |
wp1: TWordApplication;
wd1: TWordDocument;
procedure TForm1.Button1Click(Sender: TObject);
var ItemIndex:OleVariant;
i,j : integer;
begin
memo1.Clear;
wp1.Connect;
wp1.Visible := true;
wp1.Documents.Add(EmptyParam, EmptyParam);
ItemIndex := wp1.Documents.Count;
wd1.connectTo(wp1.Documents.Item(ItemIndex)); with wp1.CommandBars do
begin
for i := 1 to Count do
begin
memo1.Lines.Add(Item[i].Name
+ '---'
+ Item[i].NameLocal
+ '---'
+ IntToStr(Item[i].accChildCount));
for j:=1 to Item[i].Controls.Count do
begin
memo1.Lines.Add('--------'
+ Item[i].Controls.Item[j].Get_accName(EmptyParam)
+ ' '
+ Item[i].Controls.Item[j].Caption
+ ' '
+ Item[i].Controls.Item[j].DescriptionText);
end;
end;
end;
wp1.Disconnect;
wp1.Quit;
end;
|
hagar
版主 ![]() ![]() ![]() ![]() ![]() ![]() 發表:143 回覆:4056 積分:4445 註冊:2002-04-14 發送簡訊給我 |
|
naposhao
初階會員 ![]() ![]() 發表:18 回覆:38 積分:31 註冊:2002-10-13 發送簡訊給我 |
本站聲明 |
1. 本論壇為無營利行為之開放平台,所有文章都是由網友自行張貼,如牽涉到法律糾紛一切與本站無關。 2. 假如網友發表之內容涉及侵權,而損及您的利益,請立即通知版主刪除。 3. 請勿批評中華民國元首及政府或批評各政黨,是藍是綠本站無權干涉,但這裡不是政治性論壇! |