1. Cintia Verissimo
  2. PowerBuilder
  3. Friday, 23 July 2021 18:23 PM UTC

Hello,

I'm using PowerBuilder 2019 R2 and trying to display a MS-Word document inside a DWO,
more than 12 pages, without having to type all text using TEXT controls or
COMPUTED FIELD controls within the DWO.
I've tried to create a Pipeline definition and add a BLOB column.
Also, I tried to insert an OLE Object control, among other ways and in no way have I succeeded.
What is the best way to display an MS-Word document in a DWO and how can I do it?

I would really appreciate it if someone returned me.

 

Regards,

Cintia Verissimo.

 

zakariya mahboob Accepted Answer Pending Moderation
  1. Monday, 11 April 2022 06:04 AM UTC
  2. PowerBuilder
  3. # 1

But MS word initialization is taking lot of time, we are also using MS-word in our application through OLE custom control. It is working fine but initialization of word is taking lot of time. Any suggestion to reduce this time would be helpful.

Comment
There are no comments made yet.
William Beale Accepted Answer Pending Moderation
  1. Tuesday, 27 July 2021 22:22 PM UTC
  2. PowerBuilder
  3. # 2

Back again, Cintia,

I appreciate I am off the mark in answering your question, but something you may care to consider.

We use MS word as a defacto column in sync with a dw - the MS word, in an ole, has all the benefits of MS word - large capacity,  spell and grammar checker, dictate, etc., etc. 

Our thoughts: why work with free text from a dw column when we can utilise MS Word?

If the User moves to a new dw row, the corresponding MS Word document loads in sync. 

Because its content is saved and loaded as a Blob, each new row does take a second or so to load - a minor drawback in our opinion.

Attachments (1)
Comment
There are no comments made yet.
William Beale Accepted Answer Pending Moderation
  1. Tuesday, 27 July 2021 20:58 PM UTC
  2. PowerBuilder
  3. # 3

Good day again, Cintia,

While I'm at early stages of development, I haven't had an experience of losing content on copying from MS Word to a dw.

To explain what we're doing, for one purpose, we have a MS Word document opened in  an ole - as suggested by John.  The document is opened from, and saved in, the DB as a BLOB. (I appreciate from your explanation your not doing this)

 

When working from the MS Word document, the user highlights text excerpts they want to copy from the MS word document, clicks a paste button, and the excerpt is transferred to a dw column. 

Accordingly, there is no need to handle selected text excerpts that may be truncated because they exceed the extent of the varchar column. 

Random bits of copied information are accrued, collated, and sorted using dw functionality, and then re-compiled back into another MS Word document - usually many pages.  No data lost. 

Some formatting is lost on transfer to the DW, such as paragraph separation (I'm not using a rte field - simply varchar). 

However, eDraw does provide a command to create a new paragraph but I've not ventured using it beyond placement at the end of copied text.  I would presume that, with some coding, paragraph breaks could be inserted to mirror the original. 

(I've tried to attach screen shots of the copied data but I can't see them in this compilation) 

We also use eDraw methods to scroll through a MS word document and programmatically colour-highlight, in a variety of colours, as well as footnote certain DB-identified cue words, and to highlight synonyms using the MS thesaurus.  

 

Attachments (2)
Comment
There are no comments made yet.
John Fauss Accepted Answer Pending Moderation
  1. Sunday, 25 July 2021 22:32 PM UTC
  2. PowerBuilder
  3. # 4

Hi, Cintia - 

I would think that utilizing MS Word via an OLE control would be best, as you would be using the actual product that was used to create the document.

Of course, this assumes that Word is installed on the PC that will be running your application.

You have mentioned that you have been unsuccessful using an OLE object within a DataWindow. Would it be acceptable to use a stand-alone OLE control (that is, an OLE window control) instead of imbedding it in a DataWindow?  Can you explain in more detail what you have tried and the problems you experienced? Maybe you can post some of your PowerScript code or post a zipped copy of the exported window (.srw) source file? Have you used OLE objects within a DataWindow previously? Can you please give us some idea of your level of experience using PowerBuilder?

Also, can you provide some background on what you are needing to accomplish? Perhaps the path you're following is not the easiest or best way to accomplish your goals.

Lots of questions, I know. I'm not sure that I can help you, but answers to the questions I've asked will help other members of the Community understand your problem better and advise you accordingly.

If you are not familiar with using OLE in PowerBuilder, I suggest you look through the documentation. I'm including two URL's you may find helpful:

https://docs.appeon.com/pb2019r3/pbug/ch06s14.html

https://docs.appeon.com/pb2019r2/application_techniques/ch22.html

Regards, John

Comment
There are no comments made yet.
William Beale Accepted Answer Pending Moderation
  1. Sunday, 25 July 2021 21:22 PM UTC
  2. PowerBuilder
  3. # 5

Hi Cintia,

We're successfully using a third party control eDraw Office to use a MS Word document in our app.  It also enables the extraction of the proprietary MS Word text as rich text, as well as other features to manipulate the Word document. 

See https://www.edrawsoft.com/officecomponent/ 

Comment
  1. Cintia Verissimo
  2. Tuesday, 27 July 2021 14:32 PM UTC
Thanks for the answer William.

The solution only requires displaying the text of the MS-DOS document within a DWO.

I don't need Power Builder to launch the MS-Word application, or another editing application.

I don't want the DWO to point the display area to MS-Word

Therefore, it is not to enable editing of text in MS-Word in DWO.

I used a second party control 'Create from File' to view a MS Word document in DWO.

However, only the first page of the document is displayed, and the text near the borders is fragmented.

The page is unconfigured within the DWO.

Is there a problem formatting the MS-Word document in a DWO?

What I'm looking for is a DWO that displays

a MS-Word document type field to be displayed inside the DWO. Would it be possible?
  1. Helpful
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.
We use cookies which are necessary for the proper functioning of our websites. We also use cookies to analyze our traffic, improve your experience and provide social media features. If you continue to use this site, you consent to our use of cookies.