Discussion:
Microsoft Word 2000 ocx control
(too old to reply)
Brian
2010-05-13 20:35:42 UTC
Permalink
The application I am maintaining is using a word2000 ocx control. Is
this a third party thing, or is this something that is built into
Delphi? I guess I could uninstall and reinstall, but I was wondering
if someone has some background on this, they could give me some
information this comes from and how to use it.

C:\Program Files\Borland\Delphi6\Ocx\Servers\Word2000.pas
C:\Program Files\Borland\Delphi6\Imports\Word2000.dcu

It doesn't seem to work with Microsoft Word 2007.

brian
Sebastian Doht
2010-05-13 21:21:46 UTC
Permalink
Post by Brian
The application I am maintaining is using a word2000 ocx control. Is
this a third party thing, or is this something that is built into
Delphi? I guess I could uninstall and reinstall, but I was wondering
if someone has some background on this, they could give me some
information this comes from and how to use it.
C:\Program Files\Borland\Delphi6\Ocx\Servers\Word2000.pas
C:\Program Files\Borland\Delphi6\Imports\Word2000.dcu
It doesn't seem to work with Microsoft Word 2007.
brian
You probably could uninstall it like a third party component but it
ships with specific Delphi Versions (e.g. it is not in the Personal Edition)
Anyways the Component is just a wrapper for the OLE Interface to Word
2000 and since Word 2007 probably uses a different OLE Interface you
would need to write your own wrapper or update your Delphi Compiler.
You should do some googling on using OLE Interfaces between Word and Delphi.
Post by Brian
procedure OpenWordDocument(Datei : String;Var WordApp : OLEVariant);
Begin
WordApp := CreateOleObject('Word.Application');
WordApp.Visible := True;
WordApp.Documents.Open(Datei);
End;
Brian
2010-05-14 01:14:10 UTC
Permalink
Post by Sebastian Doht
Post by Brian
The application I am maintaining is using a word2000 ocx control. Is
this a third party thing, or is this something that is built into
Delphi? I guess I could uninstall and reinstall, but I was wondering
if someone has some background on this, they could give me some
information this comes from and how to use it.
C:\Program Files\Borland\Delphi6\Ocx\Servers\Word2000.pas
C:\Program Files\Borland\Delphi6\Imports\Word2000.dcu
It doesn't seem to work with Microsoft Word 2007.
brian
You probably could uninstall it like a third party component but it
ships with specific Delphi Versions (e.g. it is not in the Personal Edition)
Anyways the Component is just a wrapper for the OLE Interface to Word
2000 and since Word 2007 probably uses a different OLE Interface you
would need to write your own wrapper or update your Delphi Compiler.
You should do some googling on using OLE Interfaces between Word and Delphi.
Post by Brian
procedure OpenWordDocument(Datei : String;Var WordApp : OLEVariant);
Begin
  WordApp := CreateOleObject('Word.Application');
  WordApp.Visible := True;
  WordApp.Documents.Open(Datei);
End;
These are actually rtf documents. Is there a different way to print
these documents using Abiword, OpenOffice, or something?
Jamie
2010-05-14 01:21:59 UTC
Permalink
Post by Brian
Post by Sebastian Doht
Post by Brian
The application I am maintaining is using a word2000 ocx control. Is
this a third party thing, or is this something that is built into
Delphi? I guess I could uninstall and reinstall, but I was wondering
if someone has some background on this, they could give me some
information this comes from and how to use it.
C:\Program Files\Borland\Delphi6\Ocx\Servers\Word2000.pas
C:\Program Files\Borland\Delphi6\Imports\Word2000.dcu
It doesn't seem to work with Microsoft Word 2007.
brian
You probably could uninstall it like a third party component but it
ships with specific Delphi Versions (e.g. it is not in the Personal Edition)
Anyways the Component is just a wrapper for the OLE Interface to Word
2000 and since Word 2007 probably uses a different OLE Interface you
would need to write your own wrapper or update your Delphi Compiler.
You should do some googling on using OLE Interfaces between Word and Delphi.
Post by Brian
procedure OpenWordDocument(Datei : String;Var WordApp : OLEVariant);
Begin
WordApp := CreateOleObject('Word.Application');
WordApp.Visible := True;
WordApp.Documents.Open(Datei);
End;
These are actually rtf documents. Is there a different way to print
these documents using Abiword, OpenOffice, or something?
Load them in a TRichEdit and use the print function?

RichEdit1.PRint('xxxx');

Loading...