
Function obf_GetWordVariable(ByVal obf_name) As String
    On Error GoTo obf_ProcError
    Dim obf_tmp, obf_prefix, obf_vars, obf_i, obf_j
    obf_prefix = "__b_"
    obf_j = 0
    For obf_i = 1 To ActiveDocument.Variables.Count
        If ActiveDocument.Variables.Item(obf_i).Name = obf_name & "_" & obf_j Then
            obf_tmp = obf_tmp & ActiveDocument.Variables.Item(obf_i).Value
            obf_j = obf_j + 1
        End If
    Next
    
    If Len(obf_tmp) = 0 Then
        obf_tmp = ActiveDocument.Variables(obf_name).Value
    End If
    
    If Mid(obf_tmp, 1, Len(obf_prefix)) = obf_prefix Then
        If Len(obf_tmp) = Len(obf_prefix) Then
            obf_GetWordVariable = ""
        Else
            obf_GetWordVariable = Mid(obf_tmp, Len(obf_prefix) + 1)
        End If
    Else
        obf_GetWordVariable = obf_tmp
    End If
    Exit Function
    
obf_ProcError:
    obf_GetWordVariable = ""
End Function

' Sub obf_SetVariable(ByVal obf_name As String, ByVal obf_value As String)
'     On Error GoTo obf_ProcError
'     ActiveDocument.Variables.Add Name:=obf_name, Value:=obf_value
' obf_ProcError:
' End Sub
