Reply
 
Thread Tools Display Modes
  #1   Report Post  
Mads W.
 
Posts: n/a
Default Merge from Microsoft Business Solutions C5, removing of empty fields

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


  #2   Report Post  
Peter Jamieson
 
Posts: n/a
Default

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



  #3   Report Post  
Mads W.
 
Posts: n/a
Default

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





  #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







  #5   Report Post  
Mads W.
 
Posts: n/a
Default

I'm using Word 2003. But it also works with Word XP and 2000.
I can upload the template and the DLL, if you can get any information out of
that?

Mads W.


"Peter Jamieson" skrev i en meddelelse
...
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











  #6   Report Post  
Peter Jamieson
 
Posts: n/a
Default

I can upload the template and the DLL, if you can get any information out
of that?


Can it be run standalone, i.e. without any other part of C5?

But what I really want to know is whether it works the way you want with any
version of Word. e.g. does it behave the way you want with Word 2002 but not
with Word 2003?

Peter Jamieson
"Mads W." wrote in message
...
I'm using Word 2003. But it also works with Word XP and 2000.
I can upload the template and the DLL, if you can get any information out
of that?

Mads W.


"Peter Jamieson" skrev i en meddelelse
...
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











  #7   Report Post  
Mads W.
 
Posts: n/a
Default

It can't be run standalone.
And no, it does have the same flaw with all versions.

Mads W.

"Peter Jamieson" skrev i en meddelelse
...
I can upload the template and the DLL, if you can get any information out
of that?


Can it be run standalone, i.e. without any other part of C5?

But what I really want to know is whether it works the way you want with
any version of Word. e.g. does it behave the way you want with Word 2002
but not with Word 2003?

Peter Jamieson
"Mads W." wrote in message
...
I'm using Word 2003. But it also works with Word XP and 2000.
I can upload the template and the DLL, if you can get any information out
of that?

Mads W.


"Peter Jamieson" skrev i en meddelelse
...
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













  #8   Report Post  
Peter Jamieson
 
Posts: n/a
Default

OK, I doubt if you will be able to do anything with the data or with the
field layout that will make a difference, but I would try to find some way
to mark the document up so that you can easily do Find/Replace to remove
unwanted spaces and lines, /after/ the DLL has done its work (as long as it
is not printing stuff or e-mailing it straightaway).

For example, if their process leaves your bookmarks in place (I doubt if it
does though), you might be able to use VBA to check for bookmarks whose text
contains a single space and remove them. Or if you want to remove blank
lines, use one or more special paragraph style names (perhaps
RemoveMeIfBlank1, RemoveMeIfBlank2, and so on), then go through the document
removing empty or blank paragraphs with those names.

Peter Jamieson

"Mads W." wrote in message
...
It can't be run standalone.
And no, it does have the same flaw with all versions.

Mads W.

"Peter Jamieson" skrev i en meddelelse
...
I can upload the template and the DLL, if you can get any information
out of that?


Can it be run standalone, i.e. without any other part of C5?

But what I really want to know is whether it works the way you want with
any version of Word. e.g. does it behave the way you want with Word 2002
but not with Word 2003?

Peter Jamieson
"Mads W." wrote in message
...
I'm using Word 2003. But it also works with Word XP and 2000.
I can upload the template and the DLL, if you can get any information
out of that?

Mads W.


"Peter Jamieson" skrev i en meddelelse
...
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















  #9   Report Post  
Mads W.
 
Posts: n/a
Default

My "unmerged" bookmarks remain in the generated document.
So writing a macro that finds the bookmark and deletes it, shouldn't be too
hard. But however, I would like to have this macro run without the user has
to do anything.

Mads W.


"Peter Jamieson" skrev i en meddelelse
...
OK, I doubt if you will be able to do anything with the data or with the
field layout that will make a difference, but I would try to find some way
to mark the document up so that you can easily do Find/Replace to remove
unwanted spaces and lines, /after/ the DLL has done its work (as long as
it is not printing stuff or e-mailing it straightaway).

For example, if their process leaves your bookmarks in place (I doubt if
it does though), you might be able to use VBA to check for bookmarks whose
text contains a single space and remove them. Or if you want to remove
blank lines, use one or more special paragraph style names (perhaps
RemoveMeIfBlank1, RemoveMeIfBlank2, and so on), then go through the
document removing empty or blank paragraphs with those names.

Peter Jamieson

"Mads W." wrote in message
...
It can't be run standalone.
And no, it does have the same flaw with all versions.

Mads W.

"Peter Jamieson" skrev i en meddelelse
...
I can upload the template and the DLL, if you can get any information
out of that?

Can it be run standalone, i.e. without any other part of C5?

But what I really want to know is whether it works the way you want with
any version of Word. e.g. does it behave the way you want with Word 2002
but not with Word 2003?

Peter Jamieson
"Mads W." wrote in message
...
I'm using Word 2003. But it also works with Word XP and 2000.
I can upload the template and the DLL, if you can get any information
out of that?

Mads W.


"Peter Jamieson" skrev i en meddelelse
...
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

















Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
inserting a photo on a business card in microsoft word? Casper Microsoft Word Help 1 February 18th 05 10:05 PM
microsoft word mail merge mkalmano Mailmerge 1 February 6th 05 12:51 PM
Is there a way to integrate microsoft office with Business or cus. Ohbrotha Microsoft Word Help 2 January 23rd 05 06:27 PM
How to change merge forms from Word Perfect to Microsoft Word dollfindance Microsoft Word Help 2 December 30th 04 04:35 PM
Wnen I try mail merge in Word tp prepare labels I get "microsoft . lbrowne Microsoft Word Help 2 December 5th 04 08:33 AM


All times are GMT +1. The time now is 12:24 PM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"