Convert an ancestor list document to Gedcom

From PGVWiki
Jump to navigation Jump to search

If you have a Word.doc with a name-list of ancestors you could try to translate it to a Gedcom-file.

The best way is:

  1. find a algorithm
  2. transform as table to Excel
  3. use Excel functions and VBA to split columns
  4. use VBA to build a Gedcom

But it is only for experianced VBA-programmers...


Make a copy of the original.doc which you never touch!
Make a copy at every milestone you have reached, so you can go back if necessary.
Make a log of every step you take, so you know weeks later what you have done.


Find all lines with "Gedcom-informations" like Surname, Givename, Location, Birthdate, Deatdate.
Hopefully you will find every one person in one line.

Peter Brown, New York; Farmer, 1723-1788

Make sure, you have a <CR> at the end of every person's line.
Delete all empty lines and lines with (for this moment) no useful information.
Try to give a structure to the informations by using <Tab>s.

Search and replace:

", "  -->  "^t"
"; "  -->  "^t"
"-"   -->  "^t"

Find all lines with structual information like Titles, Generations, Familys.
Find algorithms/rules to understand and to explain the information.

If the lines are like this:

Peter Brown
   Bob Brown
       Henry Brown
       Sandy Brown

May be this shows 3 generations. So you may count the leading blanks and translate it to a generation-number:

 1 Peter Brown  (grandfather)
 2 Bob Brown    (father)
 3 Henry Brown  (son)
 3 Sandy Brown  (daughter)

If you have taken out (and put in) all the information you have,
transform the doc into a table by using Word-functionality.


Import the Word.doc in Excel.
Insert a new colum and number every row.
Some single informations you could put with drag-and-drop in the right column.
Then use the built-in Excel-functions to split, add and merge columns as you need.

The result may be like this:

  • INDI
    • NAME
    • GIVN
    • SURN
    • BIRT
    • DEAT
    • OCCU
    • SEX
    • PLAC
    • Generation-nr

If you have this:

0001 Peter Brown-Kennedy

may be you will make this:

0001   Peter   Brown     male
1001   ?????   Kennedy   female

If you want, you may blow up PLAC to POST,CITY,STAE,CTRY or excerpt _MARNM from NAME or add NOTE.

If you have a Generation-nr and the rows are sorted in the way as described above, you are in the lucky position to have all informations about "who is father of whom". With this you can build also the Gedcom-family-relation:

  • FAM
    • HUSB
    • FAMC
    • NCHI
    • CHIL
    • NMR


For to build a Gedcom, first you have to build a Gedcom-structure (see Tutorial).
Then use a Excel-VBA to put the cells of every row in a Gedcom-file.

objDatei.WriteLine "0 @I" & (Trim(.Cells(lngZeile, 1))) & "@ INDI"
objDatei.WriteLine "1 SEX " & (Trim(.Cells(lngZeile, 2)))
objDatei.WriteLine "1 NAME " & (Trim(.Cells(lngZeile, 3))) & " " & "/" & (Trim(.Cells(lngZeile, 4))) & "/"
objDatei.WriteLine "2 GIVN " & (Trim(.Cells(lngZeile, 3)))
objDatei.WriteLine "2 SURN " & (Trim(.Cells(lngZeile, 4)))

Good luck!