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

zezo2021

Member
Local time
Today, 09:26
Joined
Mar 25, 2021
Messages
381
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: 417

The_Doc_Man

Immoderate Moderator
Staff member
Local time
Today, 02:26
Joined
Feb 28, 2001
Messages
27,148
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.
 

The_Doc_Man

Immoderate Moderator
Staff member
Local time
Today, 02:26
Joined
Feb 28, 2001
Messages
27,148
I did a further lookup for you. The question is, how much automation is involved and how many manual operations will be involved?

See this article:


If you can convert the table to a text file, you can import it to Access easily.
 

SHANEMAC51

Active member
Local time
Today, 10:26
Joined
Jan 28, 2022
Messages
310
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: 259

Users who are viewing this thread

Top Bottom