putting tabs in a mail merge field?

M

mike_mike

Hi

i standard letter with merge codes
{address}

Dear sir

These companies are in breach..
{mydata}

I want to all the following data into {mydata}
2005 tab Company 1
2006 tab company 2

I am merging from excel how do i get the tabs into word as they seem to be
turning to spaces? I do have them in the excel using char(9) in the source
data ..I do not want to use a list/catalog/directory merge just a standard
letter.
 
P

Peter Jamieson

Which version of Word? When I try to do this in Office 2003, the tabs come
across no matter which way I connect to Excel (DDE, OLEDB, ODBC). (They do
/not/ come across if I just copy/paste into Word, unless I use Edit|Paste
Special and choose, e.g. RTF formatted text rather than HTML format).

Peter Jamieson
 
M

mike_mike

I'm using 2002 word and i'm not connecting to excel. I'm
running the word mail merge from excel VB code , and opening word up from
there..
 
P

Peter Jamieson

OK, I have to be quick and will be offline for a few days:
a. Word mailmerge always needs a connection to a data source. If you are
not making it programmatically, then it was already set up in the Word
document.
b. In Word 2002, the default connection method would be OLEDB. Although my
tests here suggest the tabs should get through, my test data may be too
simple to reveal the problem.
c. It may be worth making the connection using one of the other methods -
in Word, check Tools|Options|General|"Confirm conversions at open", go
through the data source selection, and choose either DDE or ODBC when
offered. However, unfortunately you may also encounter problems related to
DDE or to the fact that the data source is already open.

If what you are actually doing is a "roll-your-own" merge where your Excel
VB code is placing data in the Word document, then that may be the source of
the problem. If you're doing that, I suggest you post a new message showing
the code you're using.

Peter Jamieson
 
D

Doug Robbins - Word MVP

I think that your bigger problem is going to be that you are appear to be
trying to perform a multiple items per condition mailmerge, which is
something that is not possible with a simple mailmerge. See the "Group
Multiple items for a single condition" item on fellow MVP Cindy Meister's
website at

http://homepage.swissonline.ch/cindymeister/mergfaq1.htm#DBPic


Or take a look at the following Knowledge Base Article

http://support.microsoft.com/default.aspx?scid=kb;en-us;211303

or at:

http://www.knowhow.com/Guides/CompoundMerges/CompoundMerge.htm


--
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top