It is set, but not persistent. The value only lasts as long as the procedure setting it. If you use it in a function or another sub while your procedure is still running, it will have the value.
You might make them persistent in the document by using Document Variable instead.
Code:
Let ActiveDocument.Variables("FilePath").Value = "C:\MyDocs\"
Public Function strFilePath() as String
Let strFilePath = ActiveDocument.Variables("FilePath")
End Function
or store in the template holding the code...
Code:
Let ThisDocument.Variables("FilePath").Value = "C:\MyDocs\"
Public Function strFilePath() as String
Let strFilePath = ThisDocument.Variables("FilePath")
End Function