> Thom,
>
> Didn't running Jean-Guy's macro effectively put a space character in each of
> your currently attached template's variables? (that's what
> ThisDocument.Variables references) After running his macro and you go into
> 'File | Properties menu, Custom tab' of a document loaded by the template,
> what do you see? If you still see something other than spaces (which will
> look like your variables name 'values' are empty), then you might be playing
> with the wrong template or you may be still populating the variables via
> test code (in which case you should delete or comment out that part of the
> code).
>
>> Jean-Guy Marcil wrote:
>>> Thom was telling us:
>>> Thom nous racontait que :
>>>
>>>> Before releasing my template to the user, I need to clear the
>>>> docvariables and reset the arrays. Is there a simple way of doing such
>>>> without copying the code to a new template? The userform has a couple
>>>> combo boxes which I populate for the user to select from. Now I want
>>>> to clear out all the testing data and start over.
>>>
>>> For doc variables, you do not really need to clear them.
>>> As soon as the user created a document, your code will overwrite them.
>>>
>>> But, if you need to, try something like:
>>>
>>> Dim myDocVar As Variables
>>>
>>> For Each myDocVar In ThisDocument.Variables
>>> myDocVar.Value = " "
>>> Next
>>>
>>> I use a space because if I had used "", this would have effectively deleted
>>> the document variable.
>>>
>>> I am not sure what you mean by
>>> "reset the arrays"
>>> What arrays?
>>>
>>> --
>>> Salut!
>>> _______________________________________
>>> Jean-Guy Marcil - Word MVP
>>> jmarcilREMOVE[ at ]CAPSsympatico.caTHISTOO
>>> Word MVP site:
http://www.word.mvps.org>>
>> Jean-Guy,
>>
>> Thanks for the snipet, but think of it this way. I have lots of test
>> data in a template and now I want it all to go away.
>> Here is the userform initialize piece that loads the combo box.
>> For Each aVar In fMyTemplate.Variables
>> sVariableName = aVar.Name