//
unit ads_AcroExch_App; {Copyright(c)2016 Advanced Delphi Systems Richard Maley Advanced Delphi Systems 12613 Maidens Bower Drive Potomac, MD 20854 USA phone 301-840-1554 dickmaley@advdelphisys.com The code herein can be used or modified by anyone. Please retain references to Richard Maley at Advanced Delphi Systems. If you make improvements to the code please send your improvements to dickmaley@advdelphisys.com so that the entire Delphi community can benefit. All comments are welcome. } (*UnitIndex Master Index Implementation Section Download Units
Description: ads_AcroExch_App.pas This unit contains the following routines.
Register TAcroExch_App.CloseAllDocs TAcroExch_App.Exit TAcroExch_App.GetActiveDoc TAcroExch_App.GetActiveTool TAcroExch_App.GetAVDoc TAcroExch_App.GetFrame TAcroExch_App.GetInterface TAcroExch_App.GetLanguage TAcroExch_App.GetNumAVDocs TAcroExch_App.GetPreferenceEx TAcroExch_App.Hide TAcroExch_App.Lock TAcroExch_App.Maximize TAcroExch_App.MenuItemExecute TAcroExch_App.MenuItemIsEnabled TAcroExch_App.MenuItemIsMarked TAcroExch_App.MenuItemRemove TAcroExch_App.Minimize TAcroExch_App.Restore TAcroExch_App.SetActiveTool TAcroExch_App.SetFrame TAcroExch_App.SetPreferenceEx TAcroExch_App.Show TAcroExch_App.ToolButtonIsEnabled TAcroExch_App.ToolButtonRemove TAcroExch_App.Unlock TAcroExch_App.UnlockEx
*) interface Uses Acrobat_TLB, Classes; Type TAcroExch_App = class(TComponent) Private FAcroExch_App : Variant; Public constructor Create(AOwner: TComponent); override; destructor Destroy; override; function CloseAllDocs(): Boolean; function Exit(): Boolean; function GetActiveDoc: IDispatch; function GetActiveTool(): String; function GetAVDoc(nIndex: Integer): IDispatch; function GetFrame: IDispatch; function GetInterface(szName: String): IDispatch; function GetLanguage(): String; function GetNumAVDocs(): Integer; function GetPreferenceEx(nType: Integer): Variant; function Hide(): Boolean; function Lock(szLockedBy: String): Boolean; function Maximize(bMaximize: Boolean): Boolean; function MenuItemExecute(szMenuItemName: String): Boolean; function MenuItemIsEnabled(szMenuItemName: String): Boolean; function MenuItemIsMarked(szMenuItemName: String): Boolean; function MenuItemRemove(szMenuItemName: String): Boolean; function Minimize(BMinimize: Boolean): Boolean; function Restore(bRestore: Boolean): Boolean; function SetActiveTool(szButtonName: String;bPersistent: Boolean): Boolean; function SetFrame(iAcroRect: IDispatch): Boolean; function SetPreferenceEx(nType: Integer;pVal: VARIANT): Boolean; function Show(): Boolean; function ToolButtonIsEnabled(szButtonName: String): Boolean; function ToolButtonRemove(szButtonName: String): Boolean; function Unlock(): Boolean; function UnlockEx(szLockedBy: String): Boolean; End; procedure Register; implementation Uses Variants, ComObj; //Unit Description UnitIndex Master Index
procedure Register; begin RegisterComponents('Acrobat', [TAcroExch_App]); end; //Unit Description UnitIndex Master Index
function TAcroExch_App.CloseAllDocs: Boolean; begin Result := FAcroExch_App.CloseAllDocs; end; constructor TAcroExch_App.Create(AOwner: TComponent); begin inherited; FAcroExch_App := CreateOleObject('AcroExch.App'); end; destructor TAcroExch_App.Destroy; begin FAcroExch_App := unassigned; inherited; end; //Unit Description UnitIndex Master Index
function TAcroExch_App.Exit: Boolean; begin Result := FAcroExch_App.Exit; end; //Unit Description UnitIndex Master Index
function TAcroExch_App.GetActiveDoc: IDispatch; begin Result := FAcroExch_App.GetActiveDoc; end; //Unit Description UnitIndex Master Index
function TAcroExch_App.GetActiveTool: String; begin Result := FAcroExch_App.GetActiveTool; end; //Unit Description UnitIndex Master Index
function TAcroExch_App.GetAVDoc(nIndex: Integer): IDispatch; begin Result := FAcroExch_App.GetAVDoc(nIndex); end; //Unit Description UnitIndex Master Index
function TAcroExch_App.GetFrame: IDispatch; begin Result := FAcroExch_App.GetFrame; end; //Unit Description UnitIndex Master Index
function TAcroExch_App.GetInterface(szName: String): IDispatch; begin Result := FAcroExch_App.GetInterface(szName); end; //Unit Description UnitIndex Master Index
function TAcroExch_App.GetLanguage: String; begin Result := FAcroExch_App.GetLanguage; end; //Unit Description UnitIndex Master Index
function TAcroExch_App.GetNumAVDocs: Integer; begin Result := FAcroExch_App.GetNumAVDocs; end; //Unit Description UnitIndex Master Index
function TAcroExch_App.GetPreferenceEx(nType: Integer): Variant; begin Result := FAcroExch_App.GetPreferenceEx(nType); end; //Unit Description UnitIndex Master Index
function TAcroExch_App.Hide: Boolean; begin Result := FAcroExch_App.Hide; end; //Unit Description UnitIndex Master Index
function TAcroExch_App.Lock(szLockedBy: String): Boolean; begin Result := FAcroExch_App.Lock(szLockedBy); end; //Unit Description UnitIndex Master Index
function TAcroExch_App.Maximize(bMaximize: Boolean): Boolean; begin Result := FAcroExch_App.Maximize(bMaximize); end; //Unit Description UnitIndex Master Index
function TAcroExch_App.MenuItemExecute(szMenuItemName: String): Boolean; begin Result := FAcroExch_App.MenuItemExecute(szMenuItemName); end; //Unit Description UnitIndex Master Index
function TAcroExch_App.MenuItemIsEnabled(szMenuItemName: String): Boolean; begin Result := FAcroExch_App.MenuItemIsEnabled(szMenuItemName); end; //Unit Description UnitIndex Master Index
function TAcroExch_App.MenuItemIsMarked(szMenuItemName: String): Boolean; begin Result := FAcroExch_App.MenuItemIsMarked(szMenuItemName); end; //Unit Description UnitIndex Master Index
function TAcroExch_App.MenuItemRemove(szMenuItemName: String): Boolean; begin Result := FAcroExch_App.MenuItemRemove(szMenuItemName); end; //Unit Description UnitIndex Master Index
function TAcroExch_App.Minimize(BMinimize: Boolean): Boolean; begin Result := FAcroExch_App.Minimize(BMinimize); end; //Unit Description UnitIndex Master Index
function TAcroExch_App.Restore(bRestore: Boolean): Boolean; begin Result := FAcroExch_App.Restore(bRestore); end; //Unit Description UnitIndex Master Index
function TAcroExch_App.SetActiveTool(szButtonName: String;bPersistent: Boolean): Boolean; begin Result := FAcroExch_App.SetActiveTool(szButtonName,bPersistent); end; //Unit Description UnitIndex Master Index
function TAcroExch_App.SetFrame(iAcroRect: IDispatch): Boolean; begin Result := FAcroExch_App.SetFrame(iAcroRect); end; //Unit Description UnitIndex Master Index
function TAcroExch_App.SetPreferenceEx(nType: Integer;pVal: VARIANT): Boolean; begin Result := FAcroExch_App.SetPreferenceEx(nType,pVal); end; //Unit Description UnitIndex Master Index
function TAcroExch_App.Show: Boolean; begin Result := FAcroExch_App.Show; end; //Unit Description UnitIndex Master Index
function TAcroExch_App.ToolButtonIsEnabled(szButtonName: String): Boolean; begin Result := FAcroExch_App.ToolButtonIsEnabled(szButtonName); end; //Unit Description UnitIndex Master Index
function TAcroExch_App.ToolButtonRemove(szButtonName: String): Boolean; begin Result := FAcroExch_App.ToolButtonRemove(szButtonName); end; //Unit Description UnitIndex Master Index
function TAcroExch_App.Unlock: Boolean; begin Result := FAcroExch_App.Unlock; end; //Unit Description UnitIndex Master Index
function TAcroExch_App.UnlockEx(szLockedBy: String): Boolean; begin Result := FAcroExch_App.UnlockEx(szLockedBy); end; end. //