# Display Word Document in Clarion window with OLE object

**URL:** <https://clarionhub.com/t/display-word-document-in-clarion-window-with-ole-object/6936>\
**Category:** questions\
**Tags:** handcode, com\
**Created:** [January 25, 2024, 8:48pm UTC](https://clarionhub.com/t/display-word-document-in-clarion-window-with-ole-object/6936 "2024-01-25T20:48:34Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![ChrisBos](https://clarionhub.com/letter_avatar_proxy/v4/letter/c/e495f1/32.png) [@ChrisBos](https://clarionhub.com/u/ChrisBos)\
**Post date:** [January 25, 2024, 8:48pm UTC](https://clarionhub.com/t/display-word-document-in-clarion-window-with-ole-object/6936/1 "2024-01-25T20:48:34Z")

</div>

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](https://clarionhub.com/u/sk2107)) 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?

---

<div class="post-metadata">

**Author:** ![James\_Cooke](https://clarionhub.com/letter_avatar_proxy/v4/letter/j/b5ac83/32.png) [@James\_Cooke](https://clarionhub.com/u/James_Cooke)\
**Post date:** [January 25, 2024, 9:03pm UTC](https://clarionhub.com/t/display-word-document-in-clarion-window-with-ole-object/6936/2 "2024-01-25T21:03:50Z")

</div>

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](https://www.litreum.com/?articleId=6100)

---

<div class="post-metadata">

**Author:** ![Daniel1](https://clarionhub.com/letter_avatar_proxy/v4/letter/d/b19c9b/32.png) [@Daniel1](https://clarionhub.com/u/Daniel1)\
**Post date:** [January 26, 2024, 7:52am UTC](https://clarionhub.com/t/display-word-document-in-clarion-window-with-ole-object/6936/3 "2024-01-26T07:52:04Z")

</div>

You have MS Office OCX here: [hueidou/DsoFramer: DsoFramer Source & Samples (github.com)](https://github.com/hueidou/DsoFramer/tree/master)  
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

```auto
      ?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.

---

<div class="post-metadata">

**Author:** ![MarkyBoy](https://clarionhub.com/user_avatar/clarionhub.com/markyboy/32/6194_2.png) [@MarkyBoy](https://clarionhub.com/u/MarkyBoy)\
**Post date:** [January 26, 2024, 9:51am UTC](https://clarionhub.com/t/display-word-document-in-clarion-window-with-ole-object/6936/4 "2024-01-26T09:51:12Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![ChrisBos](https://clarionhub.com/letter_avatar_proxy/v4/letter/c/e495f1/32.png) [@ChrisBos](https://clarionhub.com/u/ChrisBos)\
**Post date:** [January 26, 2024, 4:54pm UTC](https://clarionhub.com/t/display-word-document-in-clarion-window-with-ole-object/6936/5 "2024-01-26T16:54:33Z")

</div>

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