The eccoMAGIC Forums
http://forums.eccoMAGIC.com/forum/YaBB.pl
Everything eccoMAGIC >> Issues, Comments, and Questions >> MagicMerge: Select WordDoc?
http://forums.eccoMAGIC.com/forum/YaBB.pl?num=1229056452

Message started by rb on 12/11/08 at 22:34:12

Title: MagicMerge: Select WordDoc?
Post by rb on 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...)  ;) ?

Title: Re: MagicMerge: Select WordDoc?
Post by Admin on 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].



Title: Re: MagicMerge: Select WordDoc?
Post by 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.

Title: Re: MagicMerge: Select WordDoc?
Post by Admin on 12/13/08 at 10:11:47


rb wrote:
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 ?


[edit]
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.


[/edit]

Title: Re: MagicMerge: Select WordDoc?
Post by 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?

Title: Re: MagicMerge: Select WordDoc?
Post by Admin on 12/14/08 at 20:28:18


rb wrote:
>> 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.

Title: Re: MagicMerge: Select WordDoc?
Post by 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?

Title: Re: MagicMerge: Select WordDoc?
Post by Admin on 12/20/08 at 10:48:09


rb wrote:
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....


The eccoMAGIC Forums » Powered by YaBB 2.1!
YaBB © 2000-2005. All Rights Reserved.