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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Another Form Question for the newbie

Status
Not open for further replies.

Elena

Technical User
Oct 20, 2000
112
US
I want to be able to get text from one documents form field and insert it into another document which is a protected form. I can insert the right text using bookmark.range, but the text is preceded with "FORMTEXT". How can I get rid of that?

Here is what I have so far:

ActiveDocument.Unprotect

Set rngRange = ActiveDocument.Bookmarks("Text").Range
rngRange.TextRetrievalMode.IncludeFieldCodes = False

Text_from_first_form = rngRange.Text
Application.Documents.Open FileName:="Filename.doc"
WordBasic.setformresult "Text", Text_from_first_form

Any help would be appreciated.

Thanks,
Elena
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top