at the last line you don't need the .getcontent.string
ActiveDocument.Variables("Variable1").setContent SelectString, true
I guess this is because this variable (SelectString) was only exists in this macro environment.
The other case you were working with an object associated with a document variable.
Hope it helps,