Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / December 2004

Tip: Looking for answers? Try searching our database.

Transfer Table content with DOCVARIABLES from a textbox

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Alok - 22 Dec 2004 05:41 GMT
Hi all

Plz tell me .
I want to transfer a doc. table's contents to the textbox in a userform.
the tables have docvariable already embedded .

I want that, when i transfer the contents from the textbox back to the doc.
table then the docvariable should be persisting in the table.

Right now it removes the docvariable name and transfers staticaly .

eg.
txt1.value = activedocument.tables(1).Range.text
activedocument.tables(1).Range.text = trim(txt1.value)

any  help is appreciating .

Thanks,
Alok
Doug Robbins - Word MVP - 22 Dec 2004 10:23 GMT
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
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.