The following should work
Code:
Sub Macro2()
With ActiveDocument
'insert the TOC
.TablesOfContents.Add _
Range:=Selection.Range, _
RightAlignPageNumbers:=True, _
UseHeadingStyles:=True, _
UpperHeadingLevel:=1, _
LowerHeadingLevel:=5, _
IncludePageNumbers:=True, _
AddedStyles:="", _
UseHyperlinks:=True, _
HidePageNumbersInWeb:=True, _
UseOutlineLevels:=True
'select the TOC
.TablesOfContents.Item(1).Range.Select
'Unlink the TOC field
Selection.Fields.Unlink
'Copy the unlinked TOC
Selection.Copy
'Undo the unlinking to restore the TOC field
ActiveDocument.Undo 1
'Next line is optional
'.TablesOfContents.Item(1).Range.Delete
End With
MsgBox "TOC Copied to clipboard"
End Sub