Why not use
txt1.Value = ActiveDocument.Variables("varname").Value
and
ActiveDocument.Variables("varname").Value = txt1.value
ActiveDocument.Fields.Update 'to update the DOCVARIABLE field with the new
value from txt1

Signature
Please post any further questions or followup to the newsgroups for the
benefit of others who may be interested. Unsolicited questions forwarded
directly to me will only be answered on a paid consulting basis.
Hope this helps
Doug Robbins - Word MVP
> Hi all
>
[quoted text clipped - 15 lines]
> Thanks,
> Alok
Alok - 23 Dec 2004 05:37 GMT
hi,
sorry that is not probably what i want..
actually i am already using all that stuff to populate the value of a
variable in the table .
the issue here is when i assign the table (which has docvariable in it) to
the text box and again transfer back to the table in the document , it remove
the docvariable placeholder and the value of the docvariable is pasted
statically .
eg.what i am doing is .
text1.value = activedocument.tables(10).range.text
[the table has a docvariable in it ]
..........<snippets>
.........
activedocument.tables(10).range.text = text1.value
[now the table removes any docvariable placeholder in it ? ]
> Why not use
>
[quoted text clipped - 26 lines]
> > Thanks,
> > Alok