Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: How to display a Word document in form?

Re: How to display a Word document in form?

From: Nick <aroughguy_at_nsp.toughguy.net>
Date: Wed, 9 Oct 2002 21:16:05 +1000
Message-ID: <VdUo9.13659$Sr6.438518@ozemail.com.au>


How about just putting this in a button trigger: (I already have an OLE object help_doc on the main block)

  ole_item := FIND_ITEM('main_block.help_doc');   IF NOT ID_NULL(ole_item)
  THEN
      Forms_OLE.Initialize_Container(ole_item, 'C:\help.doc');   END IF;   IF Forms_OLE.Server_Active(ole_item) = FALSE   THEN
      Forms_OLE.Activate_Server(ole_item);   END IF; But I got FRM-41344: OLE object not defined for help_doc in the urrent record
Damn it , What's wrong? I obviously initialized the OLE object!

Can someone help?
Nick

"Billy Verreynne" <vslabs_at_onwe.co.za> wrote in message news:ao0u40$nl0$1_at_ctb-nnrp2.saix.net...
> Nick wrote:
>
> > I'm using Forms 6i on WinXP Pro.
> > In a form, how can we open a pop-up window and display (just display the
> > content) of a Word (or RTF) document?
> <snipped>
> > But I have problem with the last step
> > - What method packages and event packages should I select if I want to
> > display (and may be zoom) the content (no other Word functionalities)
>
> No packages should be necessary as the display and zoom code sits within
> that object (i.e with the DLL/OCX that implements that object type). What
> the language and compiler must support though is late binding.
>
> Basically you create the object. Then you invoke methods of this object.
As
> this object is a OLE Variant (i.e unknown from the compiler's viewpoint),
> it will resolve the calls you make to that object at runtime.
>
> Another option is to import the type library for the object. Some dev
> environments allows you to do this and create a complete access lib for
> you, with classes and definitions and external declarations to access the
> object (in which case you can typecast variant objects to their actual
> types).
>
> > - I have tried selecting just a few packages and I already got too many
> > compilation errors and the first error is always: 'program too large'
>
> Guess why I have refused to even touch Forms for doing client-server
> development for Oracle..
>
> > And 1 more question
> > - If the above issues solved, can I put the OLE container in a canvas
and
> > automatically activate OLE content once the window containing the canvas
> > is activated?
>
> Yep, if the language allows you that. If Forms is any kind of OO language
> (is it even?), you will have a constructor for the Window. When the Window
> is created, you can also create the Ole Object, and call whatever methods
> you need to load a document and display it.
>
> Forms btw is a very bad choice when wanting to integrate your Oracle
client
> with the Microsoft desktop environment and the services it has to offer.
> Hell, it is a bad choice. Period. The only thing it has/had to offer to
> make it a candidate, was for x-platform development. With a corporate
> desktop market running 99% Microsoft Windows, that is not an issue. With
> Borland offering full source code compatibility between Windows and Linux
> (also now talk of HPUX and Solaris), Forms crossplatform ability is
> laughable.
>
> Demented and warped opinions my own as always.
>
> --
> Billy
Received on Wed Oct 09 2002 - 06:16:05 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US