From: sam on
Hi All,

I have created a button in access form that exports certain details from the
form to a word template. But when exporting textfields that has no values (on
access form) displays an error:
Error! No document variable supplied.

Here is my code to resolve this issue but it's not working.

With doc
..variables("Name").Value = Nz((Name.Value), "")
..variables("Address").Value = Nz(Address.Value, "")
..variables("City").Value = !Nz(Me.City.Value, "")

..Fields.Update
End With

Thanks in advance