Hi SaneMan,
If you compared the output from the macro I posted to the DocVariables you're trying to work with, you'd see that none of them exist! It's not a matter of what's on the userform, it's a matter of what DocVariables exit in the underlying document. Whatever document you're running the code against needs to have the DocVariables in it too - and, presumably, you'll need to create them if they don't.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
|