View Single Post
  #4   Report Post  
Peter Jamieson
 
Posts: n/a
Default

Does it do what you want it to do with /any/ version of Word?

Peter Jamieson

"Mads W." wrote in message
...
C5 uses a template and does a DLL merge where it uses bookmarks to search
where to fill in data.
So it doesn't really use MERGEFIELDS.
The merge only use bookmarks.
The DLL file is written to search for bookmarks, and if found fill in data
at the given bookmark.

Mads W.

"Peter Jamieson" skrev i en meddelelse
...
Unfortunately I don't have C5 and I suspect no-one else will be in a good
position to answer.

If C5 has created its own merge mechanism, I suspect that your only
solution will be to ask C5 for modifications that deal with Word 2003
properly.

However, if all they do is open a particular template, attach a
particular data source, and perform a standard mail merge, then
a. the problem is that in recent versions of Word, blank lines caused by
empty fields are not eliminated when those fields are nested within IF
fields and INCLUDETEXTed documents.
b. you can try doing this manually by putting the necessary paragraph
marks /inside/ the IF field results, using e.g.

{ IF "{ MERGEFIELD line1 }" "" "
{ MERGEFIELD line1 }" "" }{ IF "{ MERGEFIELD line2 }" "" "
{ MERGEFIELD line2 }" "" }

(i.e. where there is an ordinary paragraph mark immediately after the
last " on the first line).

Peter Jamieson

"Mads W." wrote in message
...
Im running Microsoft Business Solutions C5 (C5), which is an ERP system
from Denmark.
C5 has a function that can merge to Word. I use Word 2003.

When merging, C5 uses a template, where the merge fields are FORMTEXT
fields with a Bookmark.
I have tried using IF, THEN, ELSE MERGEFIELDS. But it seems that I
can't do that because of the way the merge function is set up in C5.
I can however use the bookmarks without the FORMTEXT field. But that
doesn't help me in any way.

My problem is, that I would like to delete the empty line if one of the
MERGE fields is empty. Now I get nasty spaces in the address section, if
any of my MERGE fields are empty.
Is there a way to use the IF THEN ELSE way, with this kind of merging?
Or could I run a macro after the merge is done, that will check all my
bookmarks and delete empty lines?

Best regards
Mads