Hi ...
Here is a message I posted in the word.VBA.beginners newsgroup. Cindy
Meister replied and told me to post it here, and to provide additional info.
Here's the original message I posted:
> > A couple of days ago I posted a question about making text look prettier
> > in a table. Mr. Doug Robbins gave me a prompt reply, and I thank him.
> >
> > Now I have my table. A thing of beauty. I close the document and
open
> > Mail Merge. (I am not doing Mail Merge with a macro, just trying to
print
> > envelopes manually.) But when I try to use the document with my table as
the
> > data source, the envelopes don't look right. They look like this:
> >
> > John Smith
> > 8993 Main St.
> >
> > Reno
> >
> > NV 89013
> >
> > Why the blank line between address and city, and between city and
state??
> > Well, I figured it must be because empty cells in table are not
really
> > empty. They have <Line Feed> and <Return> characters in them. Can they
be
> > erased?? Apparently not.
> >
> > I had another idea. Saved the table as a text file. I tried to use
that
> > as the data source. This time when I tried to Mail Merge, a window
popped up
> > saying the record didn't have enough data fields.
> >
> > I gotta admit that concept is too esoteric for me. The right number
of
> > data fields for a record to have is the number that it actually has. If
it
> > has six fields, then the right number for it to have is six. If it has
> > seven, the right number for it to have is seven. Is that not right??
> >
> > A data record, by definition, cannot have fewer or more fields than
it
> > actually has. Can it?? I simply don't understand.
> >
> > Anyway, my problem is to use the data, somehow, to create labels (or
> > envelopes.) Would appreciate any help.
I am using Word 2000, Windows 98 SE.
The table has nine data fields.
APN Salut. Last First Adr1 Adr2 City State Zip
APN is a code number. Salut is Mr, Ms, etc. Use seven fields in the envelope
address I'm trying to print
<<First>> <<Last>>
<<Adr1>>
<<Adr2>>
<<City>>
<<State>> <<Zip>>
Sometimes Adr2 is blank, of course, but I have used this setup in the past
with no problem. Not from a table though, but from entering data in the Word
data entry feature. It looks just like a table, though. Yes, I made sure the
box `Do Not Print Blank Lines' was checked.
Thanks for any assistance.
Sam
A man who had lately declared
That property ought to be shared,
Thought it going too far
When they called for his car,
And a list of exceptions prepared.
Thomas Thorneley,
From The Penguin
Book Of Limericks
Sam - 14 Dec 2003 19:40 GMT
I looked at the text file, and it appears that data in the fields does not
always appear where it should. Sometimes it gets pushed one field to the
right.
It should look like this:
Jones Jim Ste. 100 233 3rd St. New York NY 10368
But sometimes, it looks like this:
Jones Jim Ste. 100 233 3rd St. New York NY 10368
Is this what Word means when it says there are too few data fields?? Looks
to me like there are plenty of data fields. I guess the Zip field doesn't
exist to Word. It must think that Adr2 and City are now the same field. (I
am just speculating - I really have no idea.)
Sam
Sam - 15 Dec 2003 04:12 GMT
Have been working on this problem for several hours, and I am no closer
to figuring it out. Would really appreciate any help. I have tried to copy
the table to a Excel worksheet and use mail merge from there, but I get
message, `Could not establish DDE Connection with Excel.'
I have saved the Word document in different formats. Text, Text w/line
breaks etc. etc. etc. I have re-converted the table back to text. Nothing
seems to work.
Thanks for any help.
Sam
Peter Jamieson - 15 Dec 2003 11:15 GMT
> > as the data source. This time when I tried to Mail Merge, a window
popped up
> > saying the record didn't have enough data fields.
> >
> > I gotta admit that concept is too esoteric for me. The right number
of
> > data fields for a record to have is the number that it actually has. If
it
> > has six fields, then the right number for it to have is six. If it has
> > seven, the right number for it to have is seven. Is that not right??
> >
> > A data record, by definition, cannot have fewer or more fields than
it
> > actually has. Can it?? I simply don't understand.
It usually means that the header containing the field names suggests that
there should be a certain number of fields (let's say 6) in each record, but
when Word examines the data records it finds a different number of fields in
one or more records, say 7.
However, considering that you have used Word's data entry feature and are
(apparently) storing your data ina table in a Word document, you should not
experience this problem
> It looks just like a table, though.
Can you confirm/deny that this means that if you open the data source
document, it is (or at least looks like) a Word .doc and contains a Word
table with 9 columns? Or is it another format (e.g. a .doc with
tab-delimited records, or a .txt file)?
--
Peter Jamieson - Word MVP
> Have been working on this problem for several hours, and I am no closer
> to figuring it out. Would really appreciate any help. I have tried to copy
[quoted text clipped - 8 lines]
>
> Sam