View Single Post
 
Old 01-09-2014, 12:38 AM
macropod's Avatar
macropod macropod is offline Windows 7 32bit Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,338
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

OK, the main problem is that your 'MyField' reference is in the target document and not in the source documents, which have 'Form1' & 'Form2'. In post #3 you said:
Quote:
I'm trying to open multiple protected word documents in the same folder and extract a certain text form field by name to a word template.
On that basis, I provided code that worked on the assumption all of the source documents would be using the same field name and that their output was simply to go somewhere the target document (I coded for the data to be inserted sequentially, at the end of the document).

If you want to obtain data from different field names in different documents and output them all into one or more fields in the target document, the code has to be written to do that. Before going down that path, though, it would be helpful if you could clarify your aims. For example, does the transferred data need to go into a formfield, or can we perhaps simply insert it at the end of the target document as the code now does?
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote