Display Word Document in Clarion window with OLE object

Another novice question, I fear.

In a hand coded app I wish to display a Word Document in a Clarion window. The discussion in sk2107 (Profile - sk2107 - ClarionHub) suggests that is not possible, BUT…

Help implies that it is possible: “In-place activation: In-place activation means the user seems to stay in the OLE Controller application.”

AND… I have a sheet with a blank Tab containing an OLE object. In Properties I have indicated “Document” and the path and name of the document. In the Window Designer the document appears on the TAB, but when I compile and run, the document pops up in Word in a separate window.
This behavior suggests that displaying in a Clarion window is indeed not possible, but how can the Help and the window designer behavior be reconciled? Have I missed something?

Not sure, this is not a novice question. Here is a link to a document written on the subject nearly a quarter of a century ago. It is probably still relevant.
https://www.litreum.com/?articleId=6100

You have MS Office OCX here: hueidou/DsoFramer: DsoFramer Source & Samples (github.com)
It is source (C++) nut also compiled OCX, ready to use.
You need to register OCX using Regsvr32 dsoframer.ocx and then you can put OCX on Window and use it.
On Window.Init (or elsewhere), you can use

      ?Ocx{PROP:Create} = 'DSOFramer.FramerControl'
      ?Ocx{'Titlebar'} = False
      ?Ocx{'ActivationPolicy(4)'}
      ?Ocx{'FrameHookPolicy('&01H&')'}
      ?Ocx{'MenuBar'} = 0 ! if not needed
      ?Ocx{'BorderStyle'} = 0
      ?Ocx{'Open('&loc:YourFile&')'}

you can also save it using ?Of{'Save('&loc:YourFile&')'}

all commands are inside “dsoframer.h” file, section “_FramerControl Implementation”

It works with all versions of Word and Excel.

You may have to use Word 32-bit rather than 64-bit - although I’m not sure. I suggest if it doesn’t work after trying regsvr32.exe to register the ocx then try 32-bit office.

Regards,
Mark

1 Like

Thanks to each of you for your help. We’ll see if I can make this work.