Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.mailmerge.fields
CoolVBA CoolVBA is offline
external usenet poster
 
Posts: 3
Default How to suppress the blank lines while mering fields in Word docume

I'm using a Word OCX control to display document, and need toggle the
document display between merged and unmerged status, the VBA code seems as
below:

.mailmerge.opendatasourece(...)
.mailmerge.suppressblanklines = true

if ...
.mailmerge.viewmergefieldcodes = true
else
.mailmerge.viewmergefieldcodes = false
end if

After the above scripts run, I found the blank lines were never been
suppressed while empty fields existed, I know the .Execute() method can
suppress the blank lines, but it will permanently convert the doucment, it's
not what I wanted.

  #2   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Doug Robbins - Word MVP Doug Robbins - Word MVP is offline
external usenet poster
 
Posts: 8,832
Default How to suppress the blank lines while mering fields in Word docume

You would need to use an If...then...Else construction in the mail merge
main document to test for data in the fields to achieve what you are after.

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP

"CoolVBA" wrote in message
...
I'm using a Word OCX control to display document, and need toggle the
document display between merged and unmerged status, the VBA code seems as
below:

.mailmerge.opendatasourece(...)
.mailmerge.suppressblanklines = true

if ...
.mailmerge.viewmergefieldcodes = true
else
.mailmerge.viewmergefieldcodes = false
end if

After the above scripts run, I found the blank lines were never been
suppressed while empty fields existed, I know the .Execute() method can
suppress the blank lines, but it will permanently convert the doucment,
it's
not what I wanted.



  #3   Report Post  
Posted to microsoft.public.word.mailmerge.fields
CoolVBA CoolVBA is offline
external usenet poster
 
Posts: 3
Default How to suppress the blank lines while mering fields in Word do

Thanks much!

My case is that a text file is used as the data source which is exported by
program, and users can insert any merge fileds into a Word document. So, it
seems too diffcuilt to manage all the Next Merge Fields while the If
....then...Else construction used...


"Doug Robbins - Word MVP" wrote:

You would need to use an If...then...Else construction in the mail merge
main document to test for data in the fields to achieve what you are after.

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP

"CoolVBA" wrote in message
...
I'm using a Word OCX control to display document, and need toggle the
document display between merged and unmerged status, the VBA code seems as
below:

.mailmerge.opendatasourece(...)
.mailmerge.suppressblanklines = true

if ...
.mailmerge.viewmergefieldcodes = true
else
.mailmerge.viewmergefieldcodes = false
end if

After the above scripts run, I found the blank lines were never been
suppressed while empty fields existed, I know the .Execute() method can
suppress the blank lines, but it will permanently convert the doucment,
it's
not what I wanted.




  #4   Report Post  
Posted to microsoft.public.word.mailmerge.fields
CoolVBA CoolVBA is offline
external usenet poster
 
Posts: 3
Default How to suppress the blank lines while mering fields in Word do

Thanks much!

My case is that a text file is used as the data source which is exported by
program, and users can insert any merge fileds into a Word document. so, it
seems diffcuilt to manage all the Next fields while if...then...else
construction used...


"Doug Robbins - Word MVP" wrote:

You would need to use an If...then...Else construction in the mail merge
main document to test for data in the fields to achieve what you are after.

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP

"CoolVBA" wrote in message
...
I'm using a Word OCX control to display document, and need toggle the
document display between merged and unmerged status, the VBA code seems as
below:

.mailmerge.opendatasourece(...)
.mailmerge.suppressblanklines = true

if ...
.mailmerge.viewmergefieldcodes = true
else
.mailmerge.viewmergefieldcodes = false
end if

After the above scripts run, I found the blank lines were never been
suppressed while empty fields existed, I know the .Execute() method can
suppress the blank lines, but it will permanently convert the doucment,
it's
not what I wanted.




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
Suppress Blank Lines in Tables? JohnJohn Tables 4 June 18th 06 11:20 PM
Word mail merge should suppress blanks left by blank fields. k2swan Mailmerge 1 November 18th 05 09:41 PM
How do I suppress blank lines in a table in Word 2000? mauitom Mailmerge 1 June 24th 05 09:00 AM
In Word 2002, how do I suppress blank lines in an address? geller Mailmerge 1 February 2nd 05 05:50 AM
How to suppress blank lines at top of page Geoff Page Layout 1 December 14th 04 10:11 PM


All times are GMT +1. The time now is 06:23 AM.

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"