OK, ;et us make sure I have it.
You have a numbe rof textbox, already named. To make it simple;
text1, text2 text3 are their names
I am still confused, because there seems to be confusion bewteen Vlaue, and Name.
On one hand it appears you want to incement the object name and that make text1 = Value, text 2 = same value, text3 = same value.
If so, you call the object either b by index number, or explicitly by name. You can increase the name, by the number - just like the eample in your own post. You hsd the right idea. The only problem is that if the bookmark contains MORE stuf than the formfield, then it won't work. You would still have to explcitly grab the bookmarksd.
(Line 1) checkbox [COLOR=red yellow]"Bank Statement: " formfield[/color]
(Line 2) checkbox [COLOR=red yellow]"Pay Stub: " formfield[/color]
Checkbox is a formfield AND a bookmark (name for both the same)
formfield is a formfield AND a bookmark (name for both the same)
The highlight of the text AND the formfield is a bookmark (name = BankStatement)
Checkbox is a formfield AND a bookmark (name for both the same)
formfield is a formfield AND a bookmark (name for both the same)
The highlight of the text AND the formfield is a bookmark (name = PayStub)
Code:
Sub exportValue()
Dim sText1result As String
Dim aDoc As documrent
Dim newDoc As Document
Set aDoc = ActiveDocument
Application.Documents.Add
Set newDoc = ActiveDocumentct
aDoc.Activate
sText1result = ActiveDocument.FormFields("Text1").Result
ActiveDocument.FormFields("text2").Result = sText1result 'set the result
ActiveDocument.FormFields("text3").Result = sText1result 'set the result
ActiveDocument.Bookmarks("BankStatement").Range.Select
Selection.Copy
newDoc.Activate
Selection.Paste
aDoc.Activate
ActiveDocument.Bookmarks("PayStub").Range.Select
Selection.Copy
newDoc.Activate
Selection.Paste
aDoc.Activate
Set newDoc = Nothing
Set aDoc = Nothing
End Sub
Hopefully, we are getting closer here.
Gerry