Solved

Word Application in Oracle Forms?

Posted on 2001-07-16
4
1,589 Views
Last Modified: 2008-02-26
How to Call Word 2000 Application in Forms 6.0
Application (I know we can call through OLE)
Please provide code snippets

Thanks
By Subbu
0
Comment
Question by:vsubbu
  • 2
4 Comments
 
LVL 48

Accepted Solution

by:
schwertner earned 100 total points
ID: 6285364
Here is an example how to do even more. This is intended for filling the data into a document with bookmark.

=========================================================

Declare
  Word OLE2.Obj_Type;
  Arg  OLE2.List_Type;

Procedure Write_To_Bookmark (Bookmark_Name VarChar2, Data VarChar2) is
  Begin
    Arg:=OLE2.Create_ArgList;
    OLE2.Add_Arg (Arg, Bookmark_Name);
    OLE2.Invoke (Word,'WW7_EditGoto',Arg);
    OLE2.Destroy_ArgList (Arg);
    Arg:=OLE2.Create_ArgList;
    OLE2.Add_Arg (Arg,Data);
    OLE2.Invoke (Word,'Insert',Arg);
    OLE2.Destroy_ArgList (Arg);
  End;

Begin
  Word:=OLE2.Create_Obj ('Word.Basic');
  OLE2.Invoke (Word,'AppShow');
  Arg:=OLE2.Create_ArgList;
  OLE2.Add_Arg (Arg,'Example.dot');
  OLE2.Invoke (Word,'FileNew',Arg);
  OLE2.Destroy_ArgList (Arg);
  Write_To_Bookmark ('Bookmark1','Here I am!');
  OLE2.Invoke (Word,'StartOfDocument',Arg);
  OLE2.Release_Obj (Word);
End;

=====================================================

If you just want to open a file use this:

Declare
  Word OLE2.Obj_Type;
  Arg  OLE2.List_Type;

Begin
  Word:=OLE2.Create_Obj ('Word.Basic');
  OLE2.Invoke (Word,'AppShow');
  Arg:=OLE2.Create_ArgList;
  OLE2.Add_Arg (Arg,'Example.doc');
  OLE2.Invoke (Word,'FileOpen',Arg);
  OLE2.Destroy_ArgList (Arg);
  OLE2.Release_Obj (Word);
End;

====================================================
0
 
LVL 49

Expert Comment

by:DanRollins
ID: 7063556
Hi vsubbu@idg,
It appears that you have forgotten this question. I will ask Community Support to close it unless you finalize it within 7 days. If there is no objection or further activity, I will suggest to:

    Accept schwertner's answer.

vsubbu@idg, if you think your question was not answered at all, you can post a new comment here.  Community Support moderators will followup.

Please do not accept this comment as an answer!

EXPERTS: Your input and closing recommendations are REQUESTED.
==========
vsubbu@idg -- EE database cleanup volunteer
0
 
LVL 49

Expert Comment

by:DanRollins
ID: 7082999
Recommended disposition:

    Accept schwertner's comment(s) as an answer.

DanRollins -- EE database cleanup volunteer
0
 
LVL 1

Expert Comment

by:Moondancer
ID: 7091159
Thanks for your help here, Dan.
Finalized,  item closed.
Moondancer - EE Moderator
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Configuring and using Oracle Database Gateway for ODBC Introduction First, a brief summary of what a Database Gateway is.  A Gateway is a set of driver agents and configurations that allow an Oracle database to communicate with other platforms…
When it comes to protecting Oracle Database servers and systems, there are a ton of myths out there. Here are the most common.
This video shows, step by step, how to configure Oracle Heterogeneous Services via the Generic Gateway Agent in order to make a connection from an Oracle session and access a remote SQL Server database table.
This video shows setup options and the basic steps and syntax for duplicating (cloning) a database from one instance to another. Examples are given for duplicating to the same machine and to different machines

839 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question