I tried executing your code .... for me, there were several un-handled errors....but I probably missed something.
It looks like there is a variable named "strNewFolderName" that is not declared. Maybe it is a global variable??
I added the declaration and set "strNewFolderName" equal to "Test". Word tried to save the document to Folder "C:\docTest" (which I don't have). You should check to ensure that the folder exists before trying to save a doc to it.
Also, the calculated file name (in my test) has an error.
This is what I got using the parameter
Code:
FileName:="C:\doc" & strNewFolderName & "\" & Me!txtBN & "," & "Letter.doc"
Result:
Code:
C:\docTest\steve,Letter.doc
Look close and you will see there is a comma between steve and letter. Windows will not allow you to save a name with a special character in it.
Maybe change the comma to an underscore??
Code:
FileName:="C:\doc" & strNewFolderName & "\" & Me!txtBN & "_" & "Letter.doc"
Then you would get
Code:
C:\docTest\steve_Letter.doc