A family of Microsoft word processing software products for creating web, email, and print documents.
I have many templates that use docvariables from a userform, but some fields return with 'Error No Document Varied Supplied' when the document is generated. This is actually expected, however, I'm just wondering if there's a way to simply stop this message from appearing altogether. I just end up deleting the field in my template when the item doesn't exist. From time to time, the variable does exist and will be entered into my userform and this message won't appear, but sometimes the information does not exist and I'd like to not have to delete the error message and field if the item doesn't exist.
Thanks!
You need to use an If.. End If construction in the code behind the userform to test for data for the variable and if there is non, then set the variable to " " (a space).