How about the following. Display varRef with a docvariable field.
Code:
Dim strRef As String
Dim vRef As Variant
With ActiveDocument
strRef = Left(.Name, InStrRev(.Name, ".") - 1)
vRef = Split(strRef, "-")
strRef = "RS-A589-" & vRef(1) & "-" & vRef(0) & "-" & vRef(2) & "-" & vRef(3)
.Variables("varRef").Value = strRef
.Fields.Update
End With