0

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?

4
Contributors
4
Replies
5
Views
7 Years
Discussion Span
Last Post by BitFarmer
0

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.
0

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

0

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.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.