Aplikasi Memanggil Ms Office dengan Delphi


Tips & Trik Delphi, Tips Belajar Delphi, Belajar Delphi Onlie
unit Unit1;


interface

uses

Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, Shellapi,StdCtrls;

type
TForm1 = class(TForm)
Btn1: TButton;
Btn2: TButton;
Btn3: TButton;
Btn4: TButton;
procedure Btn1Click(Secnder: TObject);
procedure Btn2Click(Sender: TObject);
procedure Btn3Click(Sender: TObject);
procedure Btn4Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;

var
Form1: TForm1;

implementation

{$R *.dfm}

procedure TForm1.Btn1Click(Sender: TObject);
begin
ShellExecute(handle, ‘Open’, ‘C:\Program Files\Microsoft Office/Office11/Winword.exe’, NiL,NiL, SW_SHOWNORMAL);
end;

procedure TForm1.Btn2Click(Sender: TObject);
begin
ShellExecute(handle, ‘Open’, ‘C:\Program Files\Microsoft Office/Office11/excel.exe’, NiL,NiL, SW_SHOWNORMAL);
end;

procedure TForm1.Btn3Click(Sender: TObject);
begin
ShellExecute(handle, ‘Open’, ‘C:\Program Files\Microsoft Office/Office11/Powerpnt.exe’, NiL,NiL, SW_SHOWNORMAL);
end;

procedure TForm1.Btn4Click(Sender: TObject);
begin
ShellExecute(handle, ‘Open’, ‘C:\Program Files\Microsoft Office/Office11/Msaccess.exe’, NiL,NiL, SW_SHOWNORMAL);
end;

end.

TransCODE Software

Tinggalkan Balasan

Please log in using one of these methods to post your comment:

Logo WordPress.com

You are commenting using your WordPress.com account. Logout / Ubah )

Gambar Twitter

You are commenting using your Twitter account. Logout / Ubah )

Foto Facebook

You are commenting using your Facebook account. Logout / Ubah )

Foto Google+

You are commenting using your Google+ account. Logout / Ubah )

Connecting to %s