Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

delete docvariables

Status
Not open for further replies.

cramd

Programmer
Mar 28, 2001
214
0
0
US
I am trying to delete document variables by an index and not by name, ex: ActiveDocument.Variables("books").Delete()
instead this: activedocument.variables(x).delete

I have not been able to find any examples, is it possible to delete by an index or does each variable need to be named in order to delete.

cramd
 
Disregard, I have it working.
cramd
 
How'd you get it working?

:) -Andrew

alien.gif

[TAG]
... If you find my posts helpful, rate me up! ...
anongod@hotmail.com
'Drawing on my fine command of language, I said nothing.'
 
Andrew:

x = ActiveDocument.Variables.Count
If ActiveDocument.Variables.Count() > 0 Then
Do While (x <> 0)
ActiveDocument.Variables(x).Delete()
x = x - 1
Loop
End If

cramd
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top