Board index » delphi » how can I open/print a word-document from Delphi

how can I open/print a word-document from Delphi

I'd like to open a Word Document from a Delphi-program. Where can I
find more information about this or maybe does anyone have a sample
program ?

Thanks
habra...@wirehub.nl

 

Re:how can I open/print a word-document from Delphi


Put a RichEditbox on your form and write next code

procedure TForm....FormCreate(Sender: TObject);
begin
  RichEdit1.lines.LoadFromFile('C:\MyDocs\MyText.doc');
end;

For printing, put a button on your form and write next code on then
OnClick-event:

procedure TForm....BitBtn1Click(Sender: TObject);
begin
  RichEdit1.Print('- T I T L E -');
end;
===============================

ah schreef:

Quote
> I'd like to open a Word Document from a Delphi-program. Where can I
> find more information about this or maybe does anyone have a sample
> program ?

> Thanks
> habra...@wirehub.nl

Other Threads