Greetings!
I deeply appreciate this forum and its gurus (esp.
HansV) for all the help they provide to clueless MS Word users like me. I hope I am not asking for too much help in this post.
I have a large file that contains
many tables, one after another. I need a somewhat complex macro (complex to me, anyway) that can do the following:
A) first of all, every table has
six rows (some contain data, others not),
B) every table
varies in the number of columns it contains (I believe always less than 10),
C) some columns are
completely empty (no data-- they act as separators to keep things neat),
D) some columns have data in the
first cell at the head of the table. Below is a copy of one table (though the formatting might be broken, but you will get an idea I hope):
(notice the
1s in the first and third columns)
| 1 | | | 1 | | ΤΑΥΤΑ | | τὰ | | ὀνόματα | | τῶν | | υἱῶν | | Ἰσραὴλ | |
| | | | | | οὗτος | | ὁ | | ὄνομα | | ὁ | | υἱός | | Ἰσραήλ | |
| | | | | | houtos | | ho | | onoma | | ho | | huios | | Israēl | |
| | | | | | RD-NPN | | DNPN | | NNPN | | DGPM | | NGPM | | XP | |
| | | | | | this | | the | | name | | the | | son | | Israel | |
| | | | | | These (are) | | the | | names | | of the | | sons | | of Israel | |
or (notice the period -- hard to see -- in the third from the right column. It is an entire column with five empty cells below it)
ἅμα | | Ἰακὼβ | | τῷ | | πατρὶ | | αὐτῶν | · | ἕκαστος | |
ἅμα | | Ἰακώβ | | ὁ | | πατήρ | | αὐτός | | ἕκαστος | |
hama | | Iakōb | | ho | | patēr | | autos | | hekastos | |
P | | XP | | DDSM | | NDSM | | RP-GPM | | JNSM | |
at once, together | | Jacob, Iacob | | the | | father | | he, she, it | | every, each | |
together with | | Jacob | | - | | father, 2 | | their 1 | | each one | |
So the macro should try to do the following:
1) starting at the top of the file,
2) search for the next table,
3) turn each column into a row (tricky because some of the columns are either empty or have a number or perhaps punctuation / footnote mark or the like in the first row), and
4) proceed down the file to the end.
One problem: some of the columns contain footnotes (the footnote mark is always, I believe, in the first row). Nonetheless, it would be nice if these footnotes were retained, perhaps
converted into endnotes.
The results should look something like this (I had to paste it in as a table, but the columns should be separated with tabs, provided nothing in the cells is truncated and everything is formatted well):
ΚΑΙ | καί | kai | C | and | - |
ὁ | ὁ | ho | DNSM | the | - |
βασιλεὺς | βασιλεύς | basileus | NNSM | king | King |
Ἀστυάγης | Ἀστυάγης | Astyagēs | NNSM | Astyages | Astyages |
προσετέθη | προστίθημι | prostithēmi | VAPI3S | to add, to increase | was added |
πρὸς | πρός | pros | P | to, towards | to |
τοὺς | ὁ | ho | DAPM | the | - |
πατέρας | πατήρ | patēr | NAPM | father | ancestors 2 |
αὐτοῦ | αὐτός | autos | RP-GSM | he, she, it | his 1 |
, | | | | | |
§ | | | | | |
Γ | | | | | |
καὶ | καί | kai | C | and | and |
παρέλαβεν | παραλαμβάνω | paralambanō | VAAI3S | to receive from | received 4 |
Κῦρος | Κῦρος | Kyros | NNSM | Cyrus | Kuros 1 |
ὁ | ὁ | ho | DNSM | the | the 2 |
Πέρσης | Πέρσης | Persēs | NNSM | Persia, Perses | Perses 3 |
τὴν | ὁ | ho | DASF | the | - |
βασιλείαν | βασιλεία | basileia | NASF | kingdom, dominion | dominion. 6 |
αὐτοῦ | αὐτός | autos | RP-GSM | he, she, it | his 5 |
. | | | | | |
2 | | | | | |
καὶ | καί | kai | C | and | - |
ἦν | εἰμί | eimi | VIAI3S | to be, to exist | was 2 |
I would deeply appreciate your help in this matter.