Quote:Run-time error 4605 this method or property is not available because no text is selected
If you read carefully the error message, it tells you why there is an error. Chances are that it also tells you the line where error occurs, chances are that it also propose to open the debugger.
Advice: As you are debugging your code, keep screen update to see what is going on.
Private Sub CommandButton1_Click()
Application.Browser.Target = wdBrowsePage
For i = 1 To ActiveDocument.BuiltInDocumentProperties("Number of Pages")
Dim SSS As String
SSS = ActiveDocument.Range.Paragraphs(20).Range.Text
SSS = Replace(SSS, Chr(13), "")
SSS = "C:\Users\shankrayya.g\Desktop\Test\Output\file" & SSS & ".doc"
Chances are also that ActiveDocument switch as you Add a new document.
Learn to indent properly your code, it show its structure and it helps reading and understanding. It also helps spotting structures mistakes.
Indentation style - Wikipedia
In excel, I use an addin "Smart Indenter v3.5", lets guess it works the same with word.