I think that means your filename is invalid.
While the line is highlighted yellow, ..
press Ctrl+G to go to the immediate window
Type "?Docname" (without the quotes)
Press Enter and it will print out the value of DocName
Check it to make sure it is correct - or, I hope, to find the error in it.