Using DocVariables (and VBA) to write a large number of text variables from Excel file to Word doc. Getting the above error if DocVariable field is empty, and I want to get rid of the error.

Successful method so far is to nest the DocVariable inside an If statement in Word, but by the time I do that to all the DocVariables, the document will look horrendous when fields are showing.

I could also check each variable in VBA before sending it to Word, but that would require a large number of If statements (one per variable).

I could also add a space (" ") to each variable before sending it (e.g Range(FirstName) = FirstName & " "), but that then puts unwanted spaces in the Word document.

I tried comparing variables in Excel with " ", with a view to accepting the " " value if the variable was empty (i.e. ""), but I haven't been able to find a function that will work with "".

Any ideas, or variations on the above???