Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #6   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Peter Jamieson Peter Jamieson is offline
external usenet poster
 
Posts: 4,582
Default Word Mail Merge Issue

You can try the following. Before you do, it may be worth verifying that
the other approach I described does not work. To do that, I would start
with a completely blank document, and ensure that the "Confirm
conversions on open" option is unchecked. If you find that that works,
then it is possible that there is something wrong with your existing
document, and it may be worth copying its contents to that new document
and trying again. Also, if the file is not a .txt or .csv file, try
renaming it to .txt and try again.

The overview:
a. you create a .odc (Office Data(base) Connection) file that
specifies connection info. for your text file.
b. you create, or edit, a schema.ini file that tells OLE DB that your
file is tab-delimited
c. you go through the connection process again, and connect to the
..odc instead of your text file.

The details. Let's suppose your data source is called mydata.txt and is
in a folder called c:\myfiles.

First, edit/create schema.ini:-
a. In the folder that contains your data source file (e.g.
c:\myfiles), look for a file called "schema.ini". If there isn't one,
use Notepad to create one - when you first save it, put double quotes
around the name "schema.ini", otherwise Notepad will probably name the
file schema.ini.txt.
b. if there is already an entry that starts with
[mydata.txt]
then edit that entry. Otherwise, create that entry (say, at the bottom
of the list). NB. it is possible that other software on your system also
uses this entry - for example, if the file is imported into Access or
exported from Access, someone else may have set up the schema.ini entry,
and in that case you should probably leave it alone.
c. If your file is Tab-delimited, the entry needs to look something
like this:

[mydata.txt]
ColNameHeader=True
Format=TabDelimited
MaxScanRows=25

If it is Comma-delimited you would need

[mydata.txt]
ColNameHeader=True
Format=CSVDelimited
MaxScanRows=25

If it is something else, for example ";", you can use

[mydata.txt]
ColNameHeader=True
Format=Delimited(
MaxScanRows=25

d. save and close SCHEMA.INI.


Next, create a suitable .odc file. There are two approaches:
a. use Word's built-in procedure
b. copy an existing one and edit it by hand in Notepad.

I will try to lead you through (a):
- Open a blank Word document
- Choose Mailings tab-Start Mail Merge group-Select Recipients-Use
Existing List...
- Don't bother to select anything in the list of files
- click New Source...
- select Other/Advanced and click Next
- in the list of providers, choose
Microsoft Office 12.0 Access Database Engine OLE DB Provider
(i you do not see that,use
Microsoft Jet 4.0 OLE DB Provider)
- click Next
- In the Connection tab, in the Data Source field, insert the
pathname of the /folder/ that contains your text file (e.g. c:\myfiles).
The provider regards the folder as a "database" and the text files in it
as "tables"
- click on the All tab
- double-click Extend Properties and enter the following in the
dialog box:
HDR=YES
- click OK to exit that dialog box
in the Mailings tab, click
- further down the list, double-click on
Jet OLE DB:Engine Type
- enter 96 and accept the value. This tells the provider that our
database is a folder of text files.
- go back to the Connection tab and click Test Connection. If the
connection does not succeed, we won't be able to get any further.
- if the test succeeds, click OK.
- You should now see a "Select Database and Table" dialog. Your text
file should be listed, although instead of the usual "." before the
extension, you will see a #, e.g. mydata#txt (Sorry, I should have asked
what the file extension is - if it is not one of a small number of
prespecified extensions then you will need to rename it).
- select that, and proceed through the remainder of the wizard. I
suggest you name the .odc "mydata.odc"
- eventually, Word will prompt you for the file to connect to and you
choose mydata.odc.

Now try connecting your real document to the .odc data source, and see
if that fixes the problem.

No, I don't like it much either.

Peter Jamieson

http://tips.pjmsn.me.uk

On 01/02/2010 09:48, Subhasis wrote:
(1)Yes the dialogbox is showing that only.
(2)I am saving as .docx.

"Peter Jamieson" wrote:

Can you answer two questions please?

----------------
1. Is this the dialog box titled "Text File Connection Parameters",
where you get to choose between Tab, Comma, or Other?

2. Are you saving as .docx or .doc ?
----------------


Peter Jamieson

http://tips.pjmsn.me.uk

On 29/01/2010 11:08, Subhasis Hota wrote:
Is this the dialog box titled "Text File Connection Parameters", where
you get to choose between Tab, Comma, or Other?

.

 
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
mail merge data source gis Mailmerge 4 January 24th 06 07:17 PM
How can I add data fields to a data source in Word Mail Merge? cd Mailmerge 2 November 7th 05 06:41 PM
DotNet Data Table as Mail Merge Data Source goraya Mailmerge 1 July 7th 05 09:51 AM
How do I move data Colums within the data source of a mail merge hf Microsoft Word Help 1 July 5th 05 09:57 PM
data in mail merge letter being cut off - data source field size? tgone Mailmerge 1 May 20th 05 02:10 PM


All times are GMT +1. The time now is 09:49 PM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"