1. Gimmy Susan
  2. PowerBuilder
  3. Tuesday, 26 October 2021 08:08 AM UTC

hello community
I need to export / convert a datawindow in word format.

In legacy software they generate sales orders with a datawindow (this contains images, text, labels, fiels, etc.).

Has anyone already 'walked' similar roads?

I would like to avoid creating an OLE object and going to manage every single field and attribute manually.

I'm dreaming of something from command line. I know there are tons of command line converters (not free). es:

- https://www.evermap.com/autobatch.asp
- http://www.verypdf.com/wordpress/201208/convert-pdf-to-word-by-command-line-2-31081.html
- https://www.softinterface.com/Convert-Doc/Features/Convert-PDF-To-DOC.htm
- https://www.coolutils.com/CommandLine/TotalPDFConverter

You have used others with satisfaction?


Thanks in advance for your reply.

Simone Olianti Accepted Answer Pending Moderation
  1. Wednesday, 27 October 2021 10:40 AM UTC
  2. PowerBuilder
  3. # 1


try have a look at this project, if i remember well it should have a function to export to word too

  1. Miguel Leeuwe
  2. Wednesday, 27 October 2021 11:30 AM UTC
Interesting link! It definitely allows to export to RTF, so you should be able to read it with word. Question remains of course how well the conversion to RTF goes when fields are concerned etc.

Nice one!
  1. Helpful
There are no comments made yet.
Miguel Leeuwe Accepted Answer Pending Moderation
  1. Tuesday, 26 October 2021 16:02 PM UTC
  2. PowerBuilder
  3. # 2

Never done any of this myself, just some ideas:

I don't think that exporting as RTF and converting to DOC would solve your problems (but who knows?).

One approach would be to export the dw as html (SaveDocument() ) and then use whichever tools might be available?

Save as XML?

Just trying to give you an idea,

best regards.

  1. Gimmy Susan
  2. Tuesday, 26 October 2021 16:23 PM UTC

Thanks 4 the answer.

1. dw.saveas() does not have the RTF format. What do you mean ?

2. if I export the dw in xml or HTML I lose the attributes (color, bold, etc). It also exports everything in a tablelike format not in a read Document.


  1. Helpful 1
  1. Miguel Leeuwe
  2. Tuesday, 26 October 2021 16:30 PM UTC
Okay you're absolutely right, 2. is not an option.

About 1. : I was confused with the RTE control, which has SaveDocument() which allows RTF format.

Sorry, need more coffee!

  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.