Hello,
how can I open MS Word application in my Delphi program?
I think, it is necessary to work with ActiveX or maybe there is any other way or some free software for this purpose?

Hello,
how can I open MS Word application in my Delphi program?
I think, it is necessary to work with ActiveX or maybe there is any other way or some free software for this purpose?

Hello
This is a simple program that open Word Document in Delphi

unit Unit1;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, Buttons,ComObj, DB, ADODB, OleServer, Word2000, StdCtrls;

type
  TForm1 = class(TForm)
    Button1: TButton;
    procedure Button1Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form1: TForm1;

implementation

{$R *.dfm}

procedure TForm1.Button1Click(Sender: TObject);
var
    XApp:Variant;
begin
    XApp:=CreateOleObject('Word.Application');
    XApp.Visible:=true;
    XApp.documents.add;
end;

end.

No, it isn't exactly what I want.
I need to open MS Word application IN my Delphi program, on program's form.

thanks for this information. nice and useful topic.

You can do it by using a TOleContainer component placed on your form, read the help on this componet, you have all you need in there, also you can "mix" word menus with yours if neccesary.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.