0

I was wondering if there is any command in MS word to remove all the extra spaces between a huge table's border and its content and put all the lines on the same order?

Let me illustrate it by some images. Please consider the following photo:

enter image description here

I need to remove all the red-marked spaces (I tried to reveal them using the red points at the beginning of those words.)(The second photo):

enter image description here

and change the table's content to the following state:

enter image description here

Is it possible at all or I need to have a macro to do that?

P.S. We can simply write ^w (^w stands for the white spaces) in the replace field and put the "replace with" field empty and the program will remove all the extra characters except for the line breaks. But I only need the extra tab characters to be removed while the offered command will replace the spaces between the words too which ia not my intended task.

1 Answer 1

1

Word allows you to find/replace text patterns using codes in the form of wildcards. These codes are unique to Word. (see also Word - Find, Replace and Goto for Texts, Graphics, format and Others)

Please note - this is not a standard regex and is unique to Word. The functionality has some deviations and is a bit difficult especially with table cells.

I assume that the text in the table cell differs from ABC like shown in your question but always has a dot at the end.

  • Select your table
  • Use e.g. STRG+H
  • Click button More to open more options
  • Select Find what: by placing the cursor into the input field
  • Check Use wildcards
  • Find what: (\ )(*.) (note the space)
  • Replace with: \2
  • Click on Replace or Replace ALL at your own risk.

enter image description here

6
  • it does not work unfortunately. I tried it twice, but the number of the replacements was 0.
    – A-friend
    Sep 10, 2022 at 15:54
  • @A-friend - Ok, the read button is not a tab (my misreading). Please edit your question and describe the way and what is meant by I have defined them by the tab button? Sep 10, 2022 at 17:44
  • OK @help-info.de. I changed my explanations to: "I tried to reveal them using the red points at the beginning of those words."
    – A-friend
    Sep 11, 2022 at 4:39
  • 1
    @A-friend - see my edit. Sep 12, 2022 at 10:04
  • Thank you very much @help-info.de. Are you familiar with writing VB macros on 64 bit range numbers too?
    – A-friend
    Sep 13, 2022 at 18:22

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .