J
Joost
Hi,
I'm constructing a collection of word-doc's that act as template for
new document creation (dûh). Regrettably we're bound to use a weird
and crappy control-application that determines the creation of the
files etc. (It should act like a database but doesn't deliver
variables.)
We have a collection of word-documents (all 2003) of which one acts as
the variabele provider, it's a simple form that contains the
personalia of students. The other documents read the personalia-
document within a folder (directory) and populate a number of form-
elements according to the data in the personalia-doc. (Mostly copying
name, date of birth etc. sometimes giving variable-based options in
lists.) The reading of data, copying and doing the other stuff is
nicely covered by some macro's (to solve the absolute/relative
filename issue and autoupdate all fields) and some simple merging
(inlcudetext).
It works like a charm on our crappy control-application (that just
copies 'template'-documents to specific folders) but all merged data
get lost the moment we isolate a document. All includetext-fields get
a nice 'file not found' entry. So, what I look for, a macro that does
the following:
- checks if a certain file (personalia) is there
- if it's there: copy data from specific form-elements (source-doc) to
specific form-elements (target-doc)
- when it's not: contain the data copied earlier
The solution I tried: setting a boolean docvariable with a 'detect
file' function and using it while parsing the field-codes. Fields
would be something like {if {docproperty docisthere}
="true" {includetext {docproperty personalia} name \!}}; it just gives
blanks when the docisthere-variable is false. The most elegant
solution is (imho) dropping the includetext stuff and using docprops
all the way but I can't get it to work...
Somewhere should be someone with an elegant and simple solution; to
that person: 'Help!'.
-Joost
I'm constructing a collection of word-doc's that act as template for
new document creation (dûh). Regrettably we're bound to use a weird
and crappy control-application that determines the creation of the
files etc. (It should act like a database but doesn't deliver
variables.)
We have a collection of word-documents (all 2003) of which one acts as
the variabele provider, it's a simple form that contains the
personalia of students. The other documents read the personalia-
document within a folder (directory) and populate a number of form-
elements according to the data in the personalia-doc. (Mostly copying
name, date of birth etc. sometimes giving variable-based options in
lists.) The reading of data, copying and doing the other stuff is
nicely covered by some macro's (to solve the absolute/relative
filename issue and autoupdate all fields) and some simple merging
(inlcudetext).
It works like a charm on our crappy control-application (that just
copies 'template'-documents to specific folders) but all merged data
get lost the moment we isolate a document. All includetext-fields get
a nice 'file not found' entry. So, what I look for, a macro that does
the following:
- checks if a certain file (personalia) is there
- if it's there: copy data from specific form-elements (source-doc) to
specific form-elements (target-doc)
- when it's not: contain the data copied earlier
The solution I tried: setting a boolean docvariable with a 'detect
file' function and using it while parsing the field-codes. Fields
would be something like {if {docproperty docisthere}
="true" {includetext {docproperty personalia} name \!}}; it just gives
blanks when the docisthere-variable is false. The most elegant
solution is (imho) dropping the includetext stuff and using docprops
all the way but I can't get it to work...
Somewhere should be someone with an elegant and simple solution; to
that person: 'Help!'.
-Joost