Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Numbering / July 2005

Tip: Looking for answers? Try searching our database.

Blank Lines Numbered on Merge

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
L Losser - 24 Jun 2005 18:44 GMT
Hello.  I am getting undesirable results while performing a merge from an
Access DB into an existing MS Word Template using MS VB 6.0 (& Office 2000
Professional).

One of the Database fields being imported can contain 1 to 10 paragraphs of
information separated by hard-returns.  During the merge, this information
is imported into an existing numbered list.  The sequence of numbers is
correct (i.e. - the existing list ends with item number 3 and the new merge
data starts numerically with item 4), but the blank lines between each
paragraph are being numbered as well.  Here is an example:

 1.. Paragraph 1 Text

 2.. Paragraph 2 Text

 3.. Paragraph 3 Text

 4.. Merged Paragraph 4 Text
 5..
 6.. Merged Paragraph 5 Text
 7..
 8.. Merged Paragraph Text etc.

The desired behavior would be for the merged paragraphs to continue the same
sequence w/o the linefeeds being number.

Has anybody else come across this issue?  I am hoping someone with more
experience in this area has an easy solution that I am missing.

Thank you and please let me know if you have any questions,

Steve Mack
Suzanne S. Barnhill - 24 Jun 2005 20:33 GMT
Where do the blank lines come from? If they're in the mail merge main
document, omit them and use Space Before/After instead. If they're coming
from the data source (as I suspect), then there are a couple of things to
try:

1. Make sure you have Word set to suppress blank lines (that is, delete
paragraphs when the data field is empty).

2. Make the paragraph break part of the TrueText of any IF field you're
using; if there is no data, there will be no paragraph.

Signature

Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA
Word MVP FAQ site: http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.

> Hello.  I am getting undesirable results while performing a merge from an
> Access DB into an existing MS Word Template using MS VB 6.0 (& Office 2000
[quoted text clipped - 28 lines]
>
> Steve Mack
Steve Mack - 05 Jul 2005 16:22 GMT
Thank you Suzanne for your reply.

"Where do the blank lines come from?"
Yes, they are coming from the Data Source

The problem isn't occurring when the dataset's are empty, but from the blank
lines within the dataset paragraphs.

I was able to create a Macro to remedy the numbering sequence.  This seems
to be the best solution I could find so far.  Not sure yet if I can execute
a Word Macro from VB yet.

Steve Mack

> Where do the blank lines come from? If they're in the mail merge main
> document, omit them and use Space Before/After instead. If they're coming
[quoted text clipped - 42 lines]
> >
> > Steve Mack
Daiya Mitchell - 05 Jul 2005 23:52 GMT
Wouldn't a find and replace to find ^p^p and replace with ^p (find 2
paragraph marks ¶ in a row, replace with 1) work? To get rid of the empty
paragraphs. In the Word doc, after the merge.

For macro help, you should look for a Word group with vba or programming in
the name, by the way.  Word macros use VB for Applications 6.0, so I think
it should work but don't know enough to know.

> Thank you Suzanne for your reply.
>
[quoted text clipped - 62 lines]
>>>
>>> Steve Mack
Steve Mack - 06 Jul 2005 19:41 GMT
Thank you Daiya,

Yes, the macro is a simple search and replace.  In case anyone comes across
this thread and is looking for the code to execute a macro using ole here is
the code (for Word 2000):

wrdApp.Run "<macro name>"

Steve Mack

> Wouldn't a find and replace to find ^p^p and replace with ^p (find 2
> paragraph marks ¶ in a row, replace with 1) work? To get rid of the empty
[quoted text clipped - 70 lines]
> >>>
> >>> Steve Mack
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.