Delphi-PRAXiS

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Sonstige Fragen zu Delphi (https://www.delphipraxis.net/19-sonstige-fragen-zu-delphi/)
-   -   OLE Winword Shortcuts deaktivieren (https://www.delphipraxis.net/168949-ole-winword-shortcuts-deaktivieren.html)

hoika 20. Jun 2012 08:57

OLE Winword Shortcuts deaktivieren
 
Hallo #,

folgender Code blendet die Speichern-Menüpunkte aus.
Drücke ich jetzt Ctrl+S, kommt trotzdem der "Speichern unter"-Dialog.
Delphi-Quellcode:
type
  TWordObject = class
  private
    FWordApp : _Application;

var
  Btn: OleVariant;


      Btn:= FWordApp.CommandBars['File'].Controls['Speichern'];
      if VarIsNull(Btn)=False then
      begin
        Btn.Delete(Temporary);
      end;
    except
    end;
    try
      Btn:= FWordApp.CommandBars['File'].Controls['Speichern unter...'];
      if VarIsNull(Btn)=False then
      begin
        Btn.Delete(Temporary);
      end;
    except
    end;
In der WordXXXX.pas steht nicht mal das Wort ShortCut drin ...

Und nun ?

Eine 2. Sache habe ch auch noch ...
Was passiert in einer eng. Version ?


Danke


Heiko

p80286 20. Jun 2012 09:37

AW: OLE Winword Shortcuts deaktivieren
 
Du müßtest unter Extras -> Anpassen -> Befehle ->Tastatur (kommt aber auf deine Word-Version an) mal schauen.
Da kann man ganz tolle Sachen machen.

Vielleicht hilft Dir auch dieser Schnipsel weiter:
Code:
CustomizationContext = NormalTemplate
    FindKey(BuildKeyCode(wdKeyB, wdKeyControl)).Disable
    CustomizationContext = NormalTemplate
    KeyBindings.ClearAll
Gruß
K-H


Alle Zeitangaben in WEZ +1. Es ist jetzt 07:52 Uhr.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz