DOCXReadWrite kills table formatting

Questions and answers on how to use DOCXReadWrite
Post Reply
frankfinken
Posts: 20
Joined: Mon Jun 27, 2016 5:34 pm

DOCXReadWrite kills table formatting

Post by frankfinken »

Hi,

I have the following problem with a simple find/replace. The docx contains data in a formatted table. The data is replaced fine, but in the process the table formatting is destroyed.

e.g. coloured header is gone or the complete background of the table is black (I beleive the shading fill is black)

I cannot attach the document but it is simple to reproduce. Just create a table with a default style. find/replace and the style is gone.

Can I send you some of the documents that failed to replace? Maybe I'm doing something wrong or else it would realy be great if this can be fixed soon.


Thanks for your help.

Frank
frankfinken
Posts: 20
Joined: Mon Jun 27, 2016 5:34 pm

Re: DOCXReadWrite kills table formatting

Post by frankfinken »

Also, when the docx contains a table and the table Text wrapping is set to Around, the find does not return anything. Setting the text wrapping to None will make the find return the desired value.

Regards,
Frank
frankfinken
Posts: 20
Joined: Mon Jun 27, 2016 5:34 pm

Re: DOCXReadWrite kills table formatting

Post by frankfinken »

Hi, I found the formatting error in the search/replace.

The table properties "Borders and Shading" are set incorrect after find/replace
- Borders Setting All Color is set to Black in stead of the original value automatic
- Shading Setting Fill is set to Black instead of the original value No Color


Please advise... is there a way in code to work around this?
frankfinken
Posts: 20
Joined: Mon Jun 27, 2016 5:34 pm

Re: DOCXReadWrite kills table formatting

Post by frankfinken »

Any response would be appreciated...

paying customer here :!:
larsa
Site Admin
Posts: 926
Joined: Mon Jun 27, 2005 9:30 pm

Re: DOCXReadWrite kills table formatting

Post by larsa »

Hello

Can you show the code you are using?
Lars Arvidsson, Axolot Data
frankfinken
Posts: 20
Joined: Mon Jun 27, 2016 5:34 pm

Re: DOCXReadWrite kills table formatting

Post by frankfinken »

Hi,

the sample 4 application (DOCXRWSampleFindingText in directory 4-FindingText)

Can I send my sample docx to you for easy reproducing the issue?


Regards,
Frank
larsa
Site Admin
Posts: 926
Joined: Mon Jun 27, 2005 9:30 pm

Re: DOCXReadWrite kills table formatting

Post by larsa »

Hello

Yes. Please send your file to components(a)axolot.com
Lars Arvidsson, Axolot Data
frankfinken
Posts: 20
Joined: Mon Jun 27, 2016 5:34 pm

Re: DOCXReadWrite kills table formatting

Post by frankfinken »

Hi Lars,

I have send the docx to you. Note that for example a simple find on the word Datum does not return results. Also note that the black header of the first table is removed after saving.


Regards,
Frank
frankfinken
Posts: 20
Joined: Mon Jun 27, 2016 5:34 pm

Re: DOCXReadWrite kills table formatting

Post by frankfinken »

Hi Lars,

sorry to be pushing you, but my customer is pushing me for a new implementation without MSWord. I need your component for this and I cannot continue now. Can you give a timeline for a solution?

Regards,
Frank
larsa
Site Admin
Posts: 926
Joined: Mon Jun 27, 2005 9:30 pm

Re: DOCXReadWrite kills table formatting

Post by larsa »

Hello

The color issue is fixed now. Please download the latest update.

Regarding setting wrapping to Around on a table; this will store the table in a text box. If you want to find any text, you have to search the text boxes.
Lars Arvidsson, Axolot Data
frankfinken
Posts: 20
Joined: Mon Jun 27, 2016 5:34 pm

Re: DOCXReadWrite kills table formatting

Post by frankfinken »

Thanks! I'll try the new version.
frankfinken
Posts: 20
Joined: Mon Jun 27, 2016 5:34 pm

Re: DOCXReadWrite kills table formatting

Post by frankfinken »

It is working fine. Thanks for the support.
Post Reply