OLE2 package
Date: Sun, 5 Mar 2000 21:06:11 +0100
Message-ID: <89ufbs$etc$1_at_nereid.worldonline.nl>
Hi everyone,
We are using Forms 4.5, Oracle Server 7.3.4 in a Win NT environment and we use the Forms package OLE2 to start and control Word
PACKAGE BODY word IS
wdWindowStateMaximize constant number := 1; wdtrue constant varchar2(4) := 'True'; wrd ole2.obj_type;
procedure start_word is
begin
if wrd is null then
wrd := ole2.create_obj ('Word.Application');
ole2.set_property(wrd,'visible',wdtrue);
end if;
word_venster_maximaal;
end;
procedure word_venster_maximaal is
begin
ole2.invoke (wrd, 'Activate');
ole2.set_property(wrd,'Windowstate',wdWindowStateMaximize);
end;
END; After starting Word Visual Basic commands are used to control Word. The Forms application only starts Word once, the next time Word is being started, the existing Word instance is used. See the code sample above.
However if the user himself starts Word (for example from the start button), then this Word instance should be used by the Forms application.
Any ideas how this can be done?
Thanks
Wilhelm Received on Sun Mar 05 2000 - 21:06:11 CET