Once you have the headings, you need to turn them into named anchors so that your table of contents has something to link to.
- Place your cursor in front of the first letter in the heading
- Click on "Named Anchor" in the Insert menu or choose the "Named Anchor" icon in the "Common" toolbar or hit Ctrl-Alt-A (Windows) or Ctrl-Opt-A (Macintosh)
- Give your anchor a name
- Click OK