Use instead:
Code:
Sub saveastxt()
Dim RetVal As Object
Dim strName As String
On Error Resume Next
ActiveDocument.Save
If ActiveDocument.Path = "" Then
MsgBox "Document not saved!"
GoTo lbl_Exit
End If
strName = Replace(ActiveDocument.FullName, ".docx", ".txt")
ActiveDocument.SaveAs2 FileName:=strName, FileFormat:=wdFormatText
ActiveDocument.Close 0
RetVal = Shell("notepad.exe " & strName, 1)
lbl_Exit:
Exit Sub
End Sub