Repeating form fields across multiple documents?

B

bsharp

I am using Word 2007. I can now finally (thanks to Greg Maxey's site) get
repeating form fields to work within one document.

I am inserting a legacy text field, then creating a reference, then
protecting the document and choosing "filling in forms" under editing
restrictions.

I work with A LOT of forms. I can now create one document with many pages,
the first page being an "input" page where I list client name, address, date
signed, etc. then the following pages will each be a separate form that I
need and create references within each page, then just print the page I need.

However, I'd love to be able to enter the client's info into one document,
then reference those fields in separate Word documents. And, yes, I am aware
of Mail Merge, but that isn't quite the soution I'm looking for. I will be
sharing this with my team, who are not very computer-savvy, so macros are
out, as our solutions with too many steps.

So my basic question is can I reference a bookmark from another Word document?
 
G

Graham Mayor

No - the bookmark referenced must be in the same document. You *may* be able
to achieve what you want with IncludeText fields which can read bookmarked
text across documents. Though I haven't tried it with bookmarked form
fields - and it's time to pack up for the day, so you will get the
opportunity to try it before me :)

--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP


<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 
B

bsharp

Thanks.

I'm not familiar with IncludeText fields. I looked in the Help file that
there was no reference to them. Where do I find them? I'll be happy to give
it a shot.
 
G

Graham Mayor

Word 2007 help is better for some things (vba for instance) and worse for
others, than the help in Word 2003 reproduced below. However I have tried
what I had in mind this morning and while it will bring the fields from the
form, it will not bring the saved content across - so I am afraid this is a
non starter.

I suppose it would be possible to create a macro to collect the field
content from the form and write it to another document or documents, but it
would be probably be simpler to make one large document containing all the
required data and use REF fields to populate the duplicated parts.

--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP


<>>< ><<> ><<> <>>< ><<> <>>< <>><<>


Field codes: IncludeText field
{ INCLUDETEXT "FileName" [Bookmark ] [Switches ] }
Inserts the text and graphics contained in the named document. You can
insert the entire document or a portion of the document. If the document is
a Microsoft Word document, you can insert only the portion referred to by a
bookmark (bookmark: A location or selection of text in a file that you name
for reference purposes. Bookmarks identify a location within your file that
you can later refer or link to.), or if the document is an XML (Extensible
Markup Language (XML): A condensed form of Standard Generalized Markup
Language (SGML) that enables developers to create customized tags that offer
flexibility in organizing and presenting information.) file, you can insert
only the fragment referred to by an XPath expression. This field (field: A
set of codes that instructs Microsoft Word to insert text, graphics, page
numbers, and other material into a document automatically. For example, the
DATE field inserts the current date.) was formerly called the INCLUDE field.

Notes
XML features, except for saving files as XML documents, are available only
in Microsoft Office Professional Edition 2003 and Microsoft Office Word
2003.

If the source document is a Word document, you can edit the inserted text
resulting from the INCLUDETEXT field and save the changes back to the source
document. Edit the inserted text, and then press CTRL+SHIFT+F7.

The INCLUDETEXT field doesn't make use of OLE (OLE: A program-integration
technology that you can use to share information between programs. All
Office programs support OLE, so you can share information through linked and
embedded objects.).

Security Because field codes can be visible to anyone reading your
document, be sure that the information you place in field codes is not
information that you want kept private.

Instructions
"FileName"
The name and location of the document. If the location includes a long file
name with spaces, enclose it in quotation marks. Replace single backslashes
with double backslashes to specify the path (path: The route that the
operating system uses to locate a folder or file; for example, C:\House
finances\March.doc.), for example:
"C:\\My Documents\\Manual.doc"

Bookmark
The name of a bookmark that refers to the portion of the Microsoft Word
document you want to include.

Switches
\!
Prevents Word from updating fields in the inserted text unless the fields
are first updated in the source document.

\c ClassName
Here are file format converters provided with Word and their corresponding
class names:
WordPerfect version 6.x
WordPerfect6x
WordPerfect 5.x for Windows
WrdPrfctWin

\n
Specifies a namespace mapping for XPath queries. This switch is required if
the \x switch refers to an element by name in an XML file that declares a
namespace.

\t
Specifies an XSLT for formatting XML data.

\x
Specifies the XPath for returning a fragment of data in an XML file.

Examples
This field inserts the portion of the file referred to by the Summary
bookmark:
{ INCLUDETEXT "C:\\Winword\\Port Development RFP" Summary }

This field inserts the Name element of the XML document Resume.xml and
applies the XSLT Display.xsl to it:
{ INCLUDETEXT "C:\\Resume.xml" \n xmlns:a=\"resume-schema\" \t
"C:\\display.xsl" \x a:Resume/a:Name }


--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP


<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 
B

bsharp

Thanks, I appreciate you looking that up.

I think I'll just do one big document, and then make a list of the pages,
then create hyperlinks to them. Sort of like a TOC, but I know from Greg
Maxey's site that a TOC may mess up the forms.

Graham Mayor said:
Word 2007 help is better for some things (vba for instance) and worse for
others, than the help in Word 2003 reproduced below. However I have tried
what I had in mind this morning and while it will bring the fields from the
form, it will not bring the saved content across - so I am afraid this is a
non starter.

I suppose it would be possible to create a macro to collect the field
content from the form and write it to another document or documents, but it
would be probably be simpler to make one large document containing all the
required data and use REF fields to populate the duplicated parts.

--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP


<>>< ><<> ><<> <>>< ><<> <>>< <>><<>


Field codes: IncludeText field
{ INCLUDETEXT "FileName" [Bookmark ] [Switches ] }
Inserts the text and graphics contained in the named document. You can
insert the entire document or a portion of the document. If the document is
a Microsoft Word document, you can insert only the portion referred to by a
bookmark (bookmark: A location or selection of text in a file that you name
for reference purposes. Bookmarks identify a location within your file that
you can later refer or link to.), or if the document is an XML (Extensible
Markup Language (XML): A condensed form of Standard Generalized Markup
Language (SGML) that enables developers to create customized tags that offer
flexibility in organizing and presenting information.) file, you can insert
only the fragment referred to by an XPath expression. This field (field: A
set of codes that instructs Microsoft Word to insert text, graphics, page
numbers, and other material into a document automatically. For example, the
DATE field inserts the current date.) was formerly called the INCLUDE field.

Notes
XML features, except for saving files as XML documents, are available only
in Microsoft Office Professional Edition 2003 and Microsoft Office Word
2003.

If the source document is a Word document, you can edit the inserted text
resulting from the INCLUDETEXT field and save the changes back to the source
document. Edit the inserted text, and then press CTRL+SHIFT+F7.

The INCLUDETEXT field doesn't make use of OLE (OLE: A program-integration
technology that you can use to share information between programs. All
Office programs support OLE, so you can share information through linked and
embedded objects.).

Security Because field codes can be visible to anyone reading your
document, be sure that the information you place in field codes is not
information that you want kept private.

Instructions
"FileName"
The name and location of the document. If the location includes a long file
name with spaces, enclose it in quotation marks. Replace single backslashes
with double backslashes to specify the path (path: The route that the
operating system uses to locate a folder or file; for example, C:\House
finances\March.doc.), for example:
"C:\\My Documents\\Manual.doc"

Bookmark
The name of a bookmark that refers to the portion of the Microsoft Word
document you want to include.

Switches
\!
Prevents Word from updating fields in the inserted text unless the fields
are first updated in the source document.

\c ClassName
Here are file format converters provided with Word and their corresponding
class names:
WordPerfect version 6.x
WordPerfect6x
WordPerfect 5.x for Windows
WrdPrfctWin

\n
Specifies a namespace mapping for XPath queries. This switch is required if
the \x switch refers to an element by name in an XML file that declares a
namespace.

\t
Specifies an XSLT for formatting XML data.

\x
Specifies the XPath for returning a fragment of data in an XML file.

Examples
This field inserts the portion of the file referred to by the Summary
bookmark:
{ INCLUDETEXT "C:\\Winword\\Port Development RFP" Summary }

This field inserts the Name element of the XML document Resume.xml and
applies the XSLT Display.xsl to it:
{ INCLUDETEXT "C:\\Resume.xml" \n xmlns:a=\"resume-schema\" \t
"C:\\display.xsl" \x a:Resume/a:Name }


--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP


<>>< ><<> ><<> <>>< ><<> <>>< <>><<>

Thanks.

I'm not familiar with IncludeText fields. I looked in the Help file
that there was no reference to them. Where do I find them? I'll be
happy to give it a shot.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top