Welcome, Guest. Please Login or Register.
eccoMAGIC Forums
05/04/24 at 19:54:07
News: "Breathtaking" (Check out the new MagicView release at EccoTools.com)
Home Help Search Login Register


Pages: 1
Send Topic Print
MagicMerge: Select WordDoc? (Popularity: 10735 )
rb
Senior Member
****


I Love Ecco!

Posts: 88
Show the link to this post MagicMerge: Select WordDoc?
12/11/08 at 22:34:12
 
My Ecco items has a folder "DocType" which can have 5 different values, e.g. 1,2,3,4,5.
When I merge, I would like a different word template to be used depending on the DocType value.
Is this possible (or can it be possible...)  Wink ?
Back to top
 
 
  IP Logged
Admin
Administrator
*****


I love Ecco!

Posts: 134
Show the link to this post Re: MagicMerge: Select WordDoc?
Reply #1 - 12/12/08 at 03:39:14
 

 
untested but should be possible.
 
Word has an INCLUDE TEXT field which inserts another file.
 
so,
 
you merge could be
 
if record is #1,  insertfile named XXX{ choice folder value}
 
 
so,
 
which file is merged is controlled by first values.
 
 
NOTE: in this instance the loaded file inherits the fields from the primary doc,  so,
 
make sure define (even in hidden never true field)  EACH of the fields you want (or do) use in the inserted file....
 
hope helpful.
 
 
[actually *might* work even without doing that,  would be interesting to test].
 
 
Back to top
 
 

The Administrator.
WWW   IP Logged
rb
Senior Member
****


I Love Ecco!

Posts: 88
Show the link to this post Re: MagicMerge: Select WordDoc?
Reply #2 - 12/12/08 at 14:24:14
 
I created a simple field in a Word template:
{INCLUDETEXT  "\"C:\\Doc1.doc\""  \* MERGEFORMAT}
 
and this worked fine. Next, I inserted the Ecco field that controls the doc number, "DocType"
{INCLUDETEXT  "\"C:\\Doc{MERGEFIELD DocType}.doc\""  \* MERGEFORMAT}
 
This also worked great when Doc1 and Doc2 are simple text documents:  
Doc1: This is Doc 1
Doc2: This is Doc 2
 
However, I get an error when I try to add Ecco Fields to Doc 1 and Doc 2 (I added Company field);
This is Doc 1
Company = {MERGEFIELD Company}
 
I guess this is related to your comment about defining the fields in the inserted file? However, I did not understand what you meant by this.
Back to top
 
« Last Edit: 12/12/08 at 21:01:59 by rb »  
  IP Logged
Admin
Administrator
*****


I love Ecco!

Posts: 134
Show the link to this post Re: MagicMerge: Select WordDoc?
Reply #3 - 12/13/08 at 10:11:47
 
Quote from rb on 12/12/08 at 14:24:14:
I created a simple field in a Word template:
{INCLUDETEXT "\"C:\\Doc1.doc\"" \* MERGEFORMAT}

and this worked fine. Next, I inserted the Ecco field that controls the doc number, "DocType"
{INCLUDETEXT "\"C:\\Doc{MERGEFIELD DocType}.doc\"" \* MERGEFORMAT}

This also worked great when Doc1 and Doc2 are simple text documents:
Doc1: This is Doc 1
Doc2: This is Doc 2

However, I get an error when I try to add Ecco Fields to Doc 1 and Doc 2 (I added Company field);
This is Doc 1
Company = {MERGEFIELD Company}

I guess this is related to your comment about defining the fields in the inserted file? However, I did not understand what you meant by this.

 
 
 
does this:  {MERGEFIELD Company}  appear in MAIN doc ?
 
 
Edited:

note:
 
 
in general  
 
it makes sense to add a complete command line interp. to MM.
 
ie. all options (including which file to merge from) would be command line option.
 
 
would allow doing specific merges from batch file, etc.
 
 
if there are others who would be interested in this... is something that is possible to do.
 
 
Back to top
 
 

The Administrator.
WWW   IP Logged
rb
Senior Member
****


I Love Ecco!

Posts: 88
Show the link to this post Re: MagicMerge: Select WordDoc?
Reply #4 - 12/13/08 at 13:15:30
 
>> does this:  {MERGEFIELD Company}  appear in MAIN doc ?  
No, only what I wrote above.
 
Main Doc (only reference to Ecco DocType field):
{INCLUDETEXT  "\"C:\\Doc{MERGEFIELD DocType}.doc\""  \* MERGEFORMAT}  
 
DocX:
These are the referenced Docs with the other Ecco fields, e.g.
Doc1:
"This is Doc 1"
Company = {MERGEFIELD Company}  
 
 
Is this maybe not possible? Can I have Ecco MM merge fields in the referenced documents?
Back to top
 
« Last Edit: 12/13/08 at 21:31:27 by rb »  
  IP Logged
Admin
Administrator
*****


I love Ecco!

Posts: 134
Show the link to this post Re: MagicMerge: Select WordDoc?
Reply #5 - 12/14/08 at 20:28:18
 
Quote from rb on 12/13/08 at 13:15:30:
>> does this: {MERGEFIELD Company} appear in MAIN doc ?
No, only what I wrote above.

Main Doc (only reference to Ecco DocType field):
{INCLUDETEXT "\"C:\\Doc{MERGEFIELD DocType}.doc\"" \* MERGEFORMAT}

DocX:
These are the referenced Docs with the other Ecco fields, e.g.
Doc1:
"This is Doc 1"
Company = {MERGEFIELD Company}


Is this maybe not possible? Can I have Ecco MM merge fields in the referenced documents?

 
you CAN have MM fields in ref docs, but
 
DEFINE THEM in primary doc that gets merged.
 
for ex.
 
add to primary doc
{ IF 1 = 2 "{MERGEFIELD Company}" ""}
 
 
try.
Back to top
 
 

The Administrator.
WWW   IP Logged
rb
Senior Member
****


I Love Ecco!

Posts: 88
Show the link to this post Re: MagicMerge: Select WordDoc?
Reply #6 - 12/20/08 at 05:26:48
 
Hmmmm... I can't get the IF field to work at all. For example: {IF 2>1 "Yes" "No"  \* MERGEFORMAT} gives the error message:
Error! Missing test condition. after clicking alt-F9.
 
Any clue?
Back to top
 
 
  IP Logged
Admin
Administrator
*****


I love Ecco!

Posts: 134
Show the link to this post Re: MagicMerge: Select WordDoc?
Reply #7 - 12/20/08 at 10:48:09
 
Quote from rb on 12/20/08 at 05:26:48:
Hmmmm... I can't get the IF field to work at all. For example: {IF 2>1 "Yes" "No" \* MERGEFORMAT} gives the error message:
Error! Missing test condition. after clicking alt-F9.

Any clue?

 
 
just guess,  try spaces 2 > 1  not 2>1
 
and/or parens (2 > 1)
 
and or quotes
 
"2"> "1"
 
 
[untested]
 
 
the word built in DOC should tell all....
 
Back to top
 
 

The Administrator.
WWW   IP Logged
Pages: 1
Send Topic Print