Reply
 
Thread Tools Display Modes
  #1   Report Post  
Ross
 
Posts: n/a
Default Quotation marks (") in tab delimeted file causes loss of formattin

Sorry if this topic has been covered before but it was too much work to
search through 79 pages of topics.

I have a data source that is tab delimeted and some of the text fields
contain " marks (8" diameter) and appear perfectly when viewed in Excel,
however when I perform the mailmerge all fields following the " are
concatenated together losing the tab delimeter up to the next occurrance of
the " character of the end of the merge line (whichever comes first)

I have tried inserting a \ prior to the " but the same thing happens. I have
tried changing the import data to comma delimeted and ' around every field
but the sroblem still happens.

Any ideas would be greatly appreciated.
  #2   Report Post  
Cindy M -WordMVP-
 
Posts: n/a
Default

Hi ?B?Um9zcw==?=,

Sorry if this topic has been covered before but it was too much work to
search through 79 pages of topics.

google.com's newsgroup search is your friend :-) But you may not have found a
discussion on exactly this question. It would also help a lot if you'd tell us
the version of Word involved in a problem.

I would have thought putting each field's contents into 'single quotes' would
have solved the problem. If that doesn't help, then

1. Why not import it into Excel, then merge to Excel?

2. Or open the delimited text file in Word, select and Table/Convert Text to
Table

3. Or use a different character for the ", then Find/Replace in the mail merge
result to restore the "

I have a data source that is tab delimeted and some of the text fields
contain " marks (8" diameter) and appear perfectly when viewed in Excel,
however when I perform the mailmerge all fields following the " are
concatenated together losing the tab delimeter up to the next occurrance of
the " character of the end of the merge line (whichever comes first)

I have tried inserting a \ prior to the " but the same thing happens. I have
tried changing the import data to comma delimeted and ' around every field
but the sroblem still happens.



Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 8 2004)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question or reply
in the newsgroup and not by e-mail :-)

  #3   Report Post  
Ross
 
Posts: n/a
Default

Sorry about the delay in responding but I have been having trouble accessing
this site for the last 2 weeks.

The problem occurs on both Office 2000 and Office XP.

The process merges data from a database into a Word formatted Invoice
document and I would rather not have to completely rebuild the Invoice in
Excel.

Please note that the data file being exported from the database views
perfectly in Excel but does not work when importing it into Word.

The database has descriptions of parts being sold on the invoice and so an
8" grinding wheel needs to have the " mark to define it as inches.

As I have just upgraded to Office 2003 I will see if the same problem
happens on it as well but in the meantime I would love a resolution to the
problem.

"Cindy M -WordMVP-" wrote:

Hi ?B?Um9zcw==?=,

Sorry if this topic has been covered before but it was too much work to
search through 79 pages of topics.

google.com's newsgroup search is your friend :-) But you may not have found a
discussion on exactly this question. It would also help a lot if you'd tell us
the version of Word involved in a problem.

I would have thought putting each field's contents into 'single quotes' would
have solved the problem. If that doesn't help, then

1. Why not import it into Excel, then merge to Excel?

2. Or open the delimited text file in Word, select and Table/Convert Text to
Table

3. Or use a different character for the ", then Find/Replace in the mail merge
result to restore the "

I have a data source that is tab delimeted and some of the text fields
contain " marks (8" diameter) and appear perfectly when viewed in Excel,
however when I perform the mailmerge all fields following the " are
concatenated together losing the tab delimeter up to the next occurrance of
the " character of the end of the merge line (whichever comes first)

I have tried inserting a \ prior to the " but the same thing happens. I have
tried changing the import data to comma delimeted and ' around every field
but the sroblem still happens.



Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 8 2004)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question or reply
in the newsgroup and not by e-mail :-)


  #4   Report Post  
Cindy M -WordMVP-
 
Posts: n/a
Default

Hi ?B?Um9zcw==?=,

The process merges data from a database into a Word formatted Invoice
document and I would rather not have to completely rebuild the Invoice in
Excel.

You misunderstood. Import the data into Excel, then use the Excel file for
the Word merge instead of the text file.

That, or you have to put 'single quotes' around each field entry that might
contain a " sign.

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 8 2004)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question or
reply in the newsgroup and not by e-mail :-)

  #5   Report Post  
Ross
 
Posts: n/a
Default

Cindy,

Sorry for the delay in responding but it seems that every time I try and get
to this site it is unavailable - for weeks at a time!

This is a regular process that runs from a non-windows database. It writes
the information to the tab delimited file and then initiates the Word
document and prints it. This is a fully automated process and I do not see
how I could automate writing the record, running Excel, saving as an Excel
document and then running Word using the Excel file as the datasource.

I have tried creating the datasource with single quotes and it made no
difference to word. Excel reads it just fine.

This problem has been around since at least Word97 and it is a right royal
pain in the rectum.

I need a method of writing the datasource (I have FULL control over this
process) in such a way that Word can handle a string of data with a " in it.
I do not care how much I have to "fiddle" the datasource as that part is very
easy for me. But I do NOT want to have to run Excel to convert the data into
an Excel spreadsheet and then run Word. Too many steps!

Please Note: If I import into Excel and export as a comma or tab delimited
file I still have the same problem in Word!

What I cannot understand is why Excel imports the data perfectly but Word
cannot. The routine that handles that sort of file should be common to both
routines but it obviously is totally independant between the two products.

This is a Microsoft problem and I am truly sick of doing work-arounds to fix
a problem in someone elses software, especially when the problem has been
around for 10 years or more!

Please, please, please can someone either fix the problem in Word or come up
with a work-around that does not involve a complicated multistep process.

"Cindy M -WordMVP-" wrote:

Hi ?B?Um9zcw==?=,

The process merges data from a database into a Word formatted Invoice
document and I would rather not have to completely rebuild the Invoice in
Excel.

You misunderstood. Import the data into Excel, then use the Excel file for
the Word merge instead of the text file.

That, or you have to put 'single quotes' around each field entry that might
contain a " sign.

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 8 2004)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question or
reply in the newsgroup and not by e-mail :-)




  #6   Report Post  
Peter Jamieson
 
Posts: n/a
Default

In my experience, which is not particularly strong in this area, the only
way you will get this to work is to double up your quotes and surround the
string by quotes. As long as Word opens your text file using its text
converter and not ODBC then that also has the bonus of allowing you to use
multiline text and tabs (i.e. your field delimiter character) within your
text fields.

In other words, if your data contains

text1tabinches"tabminutes"tabother text

try

"text1"tab"inches"""tab"minutes"""tab"ot her text"

I do not think you have to quote the fields that do not contain
double-quotes but I do not think it does any harm either.

One problem is whether Word uses ODBC to read your text file or not.
Although it may be possible to issue an OpenDataSource command that
definitely does not use ODBC (or OLEDB for that matter)
a. you have already said that you do not have control over that part of the
process
b. I am not sure it is possible, at least in Word 2000.

Another problem may well be that the data in the file is sufficiently
complicated that Word ends up displaying its delimiter dialog box anyway,
which obviously screws up any automated process.

Peter Jamieson

"Ross" wrote in message
...
Cindy,

Sorry for the delay in responding but it seems that every time I try and
get
to this site it is unavailable - for weeks at a time!

This is a regular process that runs from a non-windows database. It writes
the information to the tab delimited file and then initiates the Word
document and prints it. This is a fully automated process and I do not see
how I could automate writing the record, running Excel, saving as an Excel
document and then running Word using the Excel file as the datasource.

I have tried creating the datasource with single quotes and it made no
difference to word. Excel reads it just fine.

This problem has been around since at least Word97 and it is a right royal
pain in the rectum.

I need a method of writing the datasource (I have FULL control over this
process) in such a way that Word can handle a string of data with a " in
it.
I do not care how much I have to "fiddle" the datasource as that part is
very
easy for me. But I do NOT want to have to run Excel to convert the data
into
an Excel spreadsheet and then run Word. Too many steps!

Please Note: If I import into Excel and export as a comma or tab delimited
file I still have the same problem in Word!

What I cannot understand is why Excel imports the data perfectly but Word
cannot. The routine that handles that sort of file should be common to
both
routines but it obviously is totally independant between the two products.

This is a Microsoft problem and I am truly sick of doing work-arounds to
fix
a problem in someone elses software, especially when the problem has been
around for 10 years or more!

Please, please, please can someone either fix the problem in Word or come
up
with a work-around that does not involve a complicated multistep process.

"Cindy M -WordMVP-" wrote:

Hi ?B?Um9zcw==?=,

The process merges data from a database into a Word formatted Invoice
document and I would rather not have to completely rebuild the Invoice
in
Excel.

You misunderstood. Import the data into Excel, then use the Excel file
for
the Word merge instead of the text file.

That, or you have to put 'single quotes' around each field entry that
might
contain a " sign.

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 8 2004)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question or
reply in the newsgroup and not by e-mail :-)




Reply
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
In Word quotation marks do not print immediately. Why? Tom V New Users 7 June 19th 05 04:59 PM
mail merg file list auroracrum Mailmerge 3 March 11th 05 08:45 PM
French (dagger) to English (curly) quotation marks Catherine Microsoft Word Help 5 February 13th 05 11:13 PM
How to include quotation marks in If/Then Statement? Dan Palow Microsoft Word Help 1 January 25th 05 03:19 PM
Adding quotation marks Ziaforever Microsoft Word Help 1 December 1st 04 09:13 PM


All times are GMT +1. The time now is 10:59 AM.

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"