Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
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
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
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
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
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
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
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 | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Suppress Blank Lines in Tables? | Tables | |||
Word mail merge should suppress blanks left by blank fields. | Mailmerge | |||
How do I suppress blank lines in a table in Word 2000? | Mailmerge | |||
In Word 2002, how do I suppress blank lines in an address? | Mailmerge | |||
How to suppress blank lines at top of page | Page Layout |