D
D
Dilettante2014-05-12 13:56:26
C++ / C#
Dilettante, 2014-05-12 13:56:26

C# Word Interop: How to merge two tables in Word document?

Hello.
The essence of the question is explained by the image. Those. you need to attach one table to the bottom edge of the second.
1b728d233f3545729290adceecc9932e.png
How can I do this using tools from the Microsoft.Office.Interop.Word namespace?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
A
Artem Voropaev, 2014-05-12
@Legolas

Have you tried recording a macro?
Then, using the recorded macro, look for the corresponding methods in Interop.
Try it.

S
Sumor, 2014-05-12
@Sumor

It is often more convenient to already have a ready-made table in advance and add rows of data there than to merge tables, since when merging tables, Word adjusts the sizes of the columns and they may turn out to be half as small as expected.
In general, joining two tables is as simple as deleting the paragraphs between them.

V
Vitaly Pukhov, 2014-11-19
@Neuroware

Word by itself manages to spoil tables in such a way that it cannot be restored later without cancellation, and if it is also "automated" it will be a glitch generator worse than windows vista

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question