subject says all. I want to improve the speed of Word8 when
running as OLE server.
I'm using Delphi 3.0 and Word8 runs slow under NT4, but even
slower under Win95 (unacceptable slow).
I switched from late to early binding, but that doesn't helped
at all.
Is there anything I can do or am I missing something?
I notice that speed is improving when I drop down a menue while
Word is running. How's that?
Does updating Delphi to 3.01 or 3.02 change things?
Any help is welcome.
Thanks in advance
--
Rüdiger Hoppe
r...@edit.de
http://www.edit.de/oho/
In my experience, it's often possible to use the native types and interfaces
directly.
This should speed things up.
I have no problems with speed in early bound Word 8/D3.
If you send me an example I might be able to help.
Rüdiger Hoppe wrote in message <01bd41fe$65c6fc00$1301a8c0@rh>...
------------------Code.................
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs
,Word_tlb,ComObj, ActiveX,StdCtrls;
type
TForm1 = class(TForm)
Button1: TButton;
OpenDialog1: TOpenDialog;
procedure Button1Click(Sender: TObject);
private
Word:WordApplication;
public
end;
var
Form1: TForm1;
implementation
{$R *.DFM}
procedure TForm1.Button1Click(Sender: TObject);
var Unknown:iUnknown;
begin
with OpenDialog1 do if execute then
begin
try
//A little goody from the ActiveX unit
OleCheck(GetActiveObject(Class_wordApplication,nil,UnKnown));
OleCheck(UnKnown.QueryInterface(wordApplication,word));
except
//Ok, We're not running yet
Word:=cowordApplication.create();
end;
Word.visible:=true;
//Cast the instance to an Olevariant and pass
//ONLY the necessary elements, because that way
// there are less Olevariant types to be evaluated!
Olevariant(Word).Documents.open(Filename:=Filename,ReadOnly:=true);
end;
end;
end.
...................Form.......................
object Form1: TForm1
Left = 386
Top = 210
Width = 130
Height = 99
BorderIcons = [biSystemMenu]
Caption = 'Wordtest'
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'MS Sans Serif'
Font.Style = []
FormStyle = fsStayOnTop
PixelsPerInch = 96
TextHeight = 13
object Button1: TButton
Left = 24
Top = 20
Width = 75
Height = 25
Caption = '&Open'
TabOrder = 0
OnClick = Button1Click
end
object OpenDialog1: TOpenDialog
Left = 8
Top = 8
end
end