Solved

Word Application in Oracle Forms?

Posted on 2001-07-16
4
1,571 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 47

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

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

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

Suggested Solutions

Background In several of the companies I have worked for, I noticed that corporate reporting is off loaded from the production database and done mainly on a clone database which needs to be kept up to date daily by various means, be it a logical…
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…
This video explains at a high level about the four available data types in Oracle and how dates can be manipulated by the user to get data into and out of the database.
This video shows how to Export data from an Oracle database using the Original Export Utility.  The corresponding Import utility, which works the same way is referenced, but not demonstrated.

785 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