I get the error described in the title when executing the code beneath. Any help would be appreciated.

VB Code:
  1. Public Sub AutoNew()
  2.  
  3.     Dim PlayName
  4.     PlayName = InputBox("Enter Name of Play", "Name of Play")
  5.     If ActiveWindow.View.SplitSpecial <> wdPaneNone Then
  6.         ActiveWindow.Panes(2).Close
  7.     End If
  8.     If ActiveWindow.ActivePane.View.Type = wdNormalView Or ActiveWindow. _
  9.         ActivePane.View.Type = wdOutlineView Then
  10.         ActiveWindow.ActivePane.View.Type = wdPrintView
  11.     End If
  12.     ActiveWindow.ActivePane.View.SeekView = wdSeekCurrentPageHeader
  13.     Selection.TypeText Text:=PlayName & vbTab & vbTab
  14.     Selection.Fields.Add Range:=Selection.Range, Type:=wdFieldPage
  15.     ActiveWindow.ActivePane.View.SeekView = wdSeekMainDocument
  16. End Sub

Port