Re: Just done my first app in Forms!

From: Nick <aroughguy_at_nsp.toughguy.net>
Date: Mon, 14 Oct 2002 16:02:59 +1000
Message-ID: <i6tq9.15295$Sr6.494283_at_ozemail.com.au>


[Quoted] "Stephan" <test_at_test.com> wrote in message news:2whq9.19758$I8.425762_at_nlnews00.chello.com...
> Please repost your question.

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?

I have tried as instructed by the online Help ('About embedding an OLE object')

- Create a new OLE object (container) on the canvas
- Link it to an existing file (right click then Insert Object)
- Importing OLE library interfaces (Object class: Word.Document.8)

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) - 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'

I then just put 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!

An answer:
We had a similar problem within a pure MS environment - initializing the OLE server takes time. We solved it by waiting a short time between initializing and activating the OLE server.

But adding a delay didn't work

Nick Received on Mon Oct 14 2002 - 08:02:59 CEST

Original text of this message