Sub TableOfContents_FromH2Tags() Selection.HomeKey Unit:=wdStory Selection.TypeParagraph Selection.MoveUp Unit:=wdLine, Count:=1 Selection.TypeText Text:="Contents:" Selection.TypeParagraph Selection.TypeText Text:="