I don't know of a simple way to do it, assuming that the printed version
needs to match what the user will see.
You can try connecting using Word VBA OpenDataSource and alias all the field
names in the SQLStatement, but that statement has a maximum of either 255 or
511 characters and it will probably only take a few fields with long field
names to exceed that limit - plus, you then have a data source that the user
will probably not be able to filter or sort, or in WOrd 2007, edit the data
from Word. e.g., you might have something like:
Sub ConnectWithAliases()
ActiveDocument.MailMerge.OpenDataSource _
Name:="C:\blah\myxls.xls", _
sqlstatement:="SELECT S.first_name AS `A`, S.last_name AS `B` FROM
[Sheet1$] [S]"
End Sub
(Make sure the quotes around A and B are backquotes, i.e. `` , not straight
quotes, i.e. ''

Signature
Peter Jamieson
http://tips.pjmsn.me.uk
> How do i only show the column headers from the excel file that I am mail
> merging into word.
[quoted text clipped - 9 lines]
> messes up the formatting in the word document when I need to print out the
> document with only the fields showing
sherobot - 22 Oct 2007 20:54 GMT
hmm not sure I could use that because other people would need to work in the
file and don't know much excel. But the work around I found was to insert a
column above row 1(the long descriptive headings) and type in A, B, C
accordingly to match the alphabetized column headings. It just seems
redundant to have to do this. Then when I merge the file I turn off row 2(
the row with my descriptive headings)
> I don't know of a simple way to do it, assuming that the printed version
> needs to match what the user will see.
[quoted text clipped - 29 lines]
> > messes up the formatting in the word document when I need to print out the
> > document with only the fields showing