Remove Enter (New line ) above and under paragraph (1 Viewer)

zezo2021

Member
Local time
Today, 21:29
Joined
Mar 25, 2021
Messages
231
Hello friends

can anyone expert in word give me code to
Remove Enter (Newline ) above and under paragraph

in all cells in the table inside a word doc

this step is necessary for me to import the table to access tables

Thanks
 

Attachments

  • sample doc to access table.zip
    21.4 KB · Views: 284

The_Doc_Man

Immoderate Moderator
Staff member
Local time
Today, 14:29
Joined
Feb 28, 2001
Messages
22,864
I examined your sample and there are cases where you will have a LOT of NewLines in the table cells. Some of those cells are HUGE, text-wise, and could not possibly be imported as anything but a LONG TEXT field. My question to you is, have you considered importing from Word first and then removing extra CR/LF (or just LF) characters? Might be easier. And there is then the question of what you intend to do with the imports, because unless you enable RTF in the fields, you will lose the bullet-points too.

You could do this either from Word (using a Macro) or Access (using VBA). IF you use Access, you could do it BEFORE importing everything by specifying the table number, row number, and column number as CurrentDocument.Table(x).Row( y ).Cell(z) but I'm not sure what doing it early would do with the import process. Doing it AFTER you import, you would be using Access RecordSet operations one field at a time. You would not need to create and manage a Word Application Object in that case.

I'm not sure which way you want to go, but I would personally favor doing the import and then coming back to clean up the Access mess. Less likely to mess up the import process, to my way of thinking. But depending on your actual requirements, might be the wrong approach. I can't tell from here.
 

SHANEMAC51

Active member
Local time
Today, 22:29
Joined
Jan 28, 2022
Messages
288
21:31 28.01.2022
An extremely unsuccessful table format - the vertical option is easily implemented in ACCESS
- it's more convenient to watch
- search/filter by any data (quote number, type of note, text of quote or note)
- you can add lines to any place
- even format lists and font as in WORD

you can print it out both in WORD and in HTM (if you want) with a small program in ACCESS.
 

Attachments

  • w28-2116.png
    w28-2116.png
    87.3 KB · Views: 136

Users who are viewing this thread

Top Bottom