Double quotes in Mail Merge

G

Guru

Hi,

How can I handle double quotes in Mail Merge?
I have datasource file which is like this

"Col1","Col2","Col3"
"abc","23"","xyz"

The above data fails to merge because the second value in
the second row i.e <23"> has a double quote. How can I
handle this problem. I have replaced the double quote with
two double quotes and it worked for me. Is this the right
approach or is their a better way to solve this.

Also, will replacing the double quote with 2 double quotes
result in any mismatch between the columns.

Kindly advice.

Thanks
Guru
 
G

Graham Mayor

Not easily :(

The method which works is to open the data source document in Word

Use the replace function to perform a wildcard search for
"([!"])
replace with
\1

This will remove the field separation quotes, leaving the single quotes (it
will leave a final quote at the end of the document which must be removed by
hand if not required there).

Select the text and from the table menu, convert text to table.

Save the document and use it as a datasource for your merge.

--
<>>< ><<> ><<> <>>< ><<> <>>< <>>< ><<>
Graham Mayor - Word MVP

Web site www.gmayor.com
Word MVP web site www.mvps.org/word
<>>< ><<> ><<> <>>< ><<> <>>< <>>< ><<>
 
G

Guest

Hi,
But when I replace double quote with two double quotes,
word is able to merge.

If <Hello!"> is what I want to appear in my word letter
after merging then, if I replace <Hello!"> with <Hello!"">
word picks up <Hello!"> by converting two double quotes
into one.

Sample data file

Original data
"Name","Address"
"Guru","Bangalore " Address"

After correction
"Name","Address"
"Guru","Bangalore "" Address"

Now the address coloumn would appear as <Bangalore "
Address> in my letter.

Kindly advice

Thanks
Guru

-----Original Message-----
Not easily :(

The method which works is to open the data source document in Word

Use the replace function to perform a wildcard search for
"([!"])
replace with
\1

This will remove the field separation quotes, leaving the single quotes (it
will leave a final quote at the end of the document which must be removed by
hand if not required there).

Select the text and from the table menu, convert text to table.

Save the document and use it as a datasource for your merge.

--
<>>< ><<> ><<> <>>< ><<> <>>< <>>< ><<>
Graham Mayor - Word MVP

Web site www.gmayor.com
Word MVP web site www.mvps.org/word
<>>< ><<> ><<> <>>< ><<> <>>< <>>< ><<>


Hi,

How can I handle double quotes in Mail Merge?
I have datasource file which is like this

"Col1","Col2","Col3"
"abc","23"","xyz"

The above data fails to merge because the second value in
the second row i.e <23"> has a double quote. How can I
handle this problem. I have replaced the double quote with
two double quotes and it worked for me. Is this the right
approach or is their a better way to solve this.

Also, will replacing the double quote with 2 double quotes
result in any mismatch between the columns.

Kindly advice.

Thanks
Guru


.
 
G

Graham Mayor

Did you read *all* of what I wrote in response to your original query.
You need to turn the data file into a table.

--
<>>< ><<> ><<> <>>< ><<> <>>< <>>< ><<>
Graham Mayor - Word MVP

Web site www.gmayor.com
Word MVP web site www.mvps.org/word
<>>< ><<> ><<> <>>< ><<> <>>< <>>< ><<>



Hi,
But when I replace double quote with two double quotes,
word is able to merge.

If <Hello!"> is what I want to appear in my word letter
after merging then, if I replace <Hello!"> with <Hello!"">
word picks up <Hello!"> by converting two double quotes
into one.

Sample data file

Original data
"Name","Address"
"Guru","Bangalore " Address"

After correction
"Name","Address"
"Guru","Bangalore "" Address"

Now the address coloumn would appear as <Bangalore "
Address> in my letter.

Kindly advice

Thanks
Guru

-----Original Message-----
Not easily :(

The method which works is to open the data source document in Word

Use the replace function to perform a wildcard search for
"([!"])
replace with
\1

This will remove the field separation quotes, leaving the single
quotes (it will leave a final quote at the end of the document which
must be removed by hand if not required there).

Select the text and from the table menu, convert text to table.

Save the document and use it as a datasource for your merge.

--
<>>< ><<> ><<> <>>< ><<> <>>< <>>< ><<>
Graham Mayor - Word MVP

Web site www.gmayor.com
Word MVP web site www.mvps.org/word
<>>< ><<> ><<> <>>< ><<> <>>< <>>< ><<>


Hi,

How can I handle double quotes in Mail Merge?
I have datasource file which is like this

"Col1","Col2","Col3"
"abc","23"","xyz"

The above data fails to merge because the second value in
the second row i.e <23"> has a double quote. How can I
handle this problem. I have replaced the double quote with
two double quotes and it worked for me. Is this the right
approach or is their a better way to solve this.

Also, will replacing the double quote with 2 double quotes
result in any mismatch between the columns.

Kindly advice.

Thanks
Guru


.
 
G

Guru

Hi,

Actually the methodology that I am following is slightly
different. I have a VB application, which creates the data
source file, and it uses the word API to merge the data
source file with the Mail Merge template. All this happens
programmatically without human intervention. So, I cannot
open the file and manipulate as suggested by you.

Now I have modified my program to replace all double
quotes with two double quotes, which in turn is taken as a
single double quote by Word.

Let me know if this approach is correct.

I can also send a sample template and data source file if
you need.


Thanks
Guru


-----Original Message-----
Did you read *all* of what I wrote in response to your original query.
You need to turn the data file into a table.

--
<>>< ><<> ><<> <>>< ><<> <>>< <>>< ><<>
Graham Mayor - Word MVP

Web site www.gmayor.com
Word MVP web site www.mvps.org/word
<>>< ><<> ><<> <>>< ><<> <>>< <>>< ><<>



Hi,
But when I replace double quote with two double quotes,
word is able to merge.

If <Hello!"> is what I want to appear in my word letter
after merging then, if I replace <Hello!"> with
word picks up <Hello!"> by converting two double quotes
into one.

Sample data file

Original data
"Name","Address"
"Guru","Bangalore " Address"

After correction
"Name","Address"
"Guru","Bangalore "" Address"

Now the address coloumn would appear as <Bangalore "
Address> in my letter.

Kindly advice

Thanks
Guru

-----Original Message-----
Not easily :(

The method which works is to open the data source document in Word

Use the replace function to perform a wildcard search for
"([!"])
replace with
\1

This will remove the field separation quotes, leaving the single
quotes (it will leave a final quote at the end of the document which
must be removed by hand if not required there).

Select the text and from the table menu, convert text to table.

Save the document and use it as a datasource for your merge.

--
<>>< ><<> ><<> <>>< ><<> <>>< <>>< ><<>
Graham Mayor - Word MVP

Web site www.gmayor.com
Word MVP web site www.mvps.org/word
<>>< ><<> ><<> <>>< ><<> <>>< <>>< ><<>



Guru wrote:
Hi,

How can I handle double quotes in Mail Merge?
I have datasource file which is like this

"Col1","Col2","Col3"
"abc","23"","xyz"

The above data fails to merge because the second value in
the second row i.e <23"> has a double quote. How can I
handle this problem. I have replaced the double quote with
two double quotes and it worked for me. Is this the right
approach or is their a better way to solve this.

Also, will replacing the double quote with 2 double quotes
result in any mismatch between the columns.

Kindly advice.

Thanks
Guru


.



.
 
G

Graham Mayor

I see your problem, but I cannot get it to work unless I use a table for the
data source. Unless someone else has a plan, I cannot offer any alternative
suggestion.

--
<>>< ><<> ><<> <>>< ><<> <>>< <>>< ><<>
Graham Mayor - Word MVP

Web site www.gmayor.com
Word MVP web site www.mvps.org/word
<>>< ><<> ><<> <>>< ><<> <>>< <>>< ><<>


Hi,

Actually the methodology that I am following is slightly
different. I have a VB application, which creates the data
source file, and it uses the word API to merge the data
source file with the Mail Merge template. All this happens
programmatically without human intervention. So, I cannot
open the file and manipulate as suggested by you.

Now I have modified my program to replace all double
quotes with two double quotes, which in turn is taken as a
single double quote by Word.

Let me know if this approach is correct.

I can also send a sample template and data source file if
you need.


Thanks
Guru


-----Original Message-----
Did you read *all* of what I wrote in response to your original
query. You need to turn the data file into a table.

--
<>>< ><<> ><<> <>>< ><<> <>>< <>>< ><<>
Graham Mayor - Word MVP

Web site www.gmayor.com
Word MVP web site www.mvps.org/word
<>>< ><<> ><<> <>>< ><<> <>>< <>>< ><<>



Hi,
But when I replace double quote with two double quotes,
word is able to merge.

If <Hello!"> is what I want to appear in my word letter
after merging then, if I replace <Hello!"> with <Hello!"">
word picks up <Hello!"> by converting two double quotes
into one.

Sample data file

Original data
"Name","Address"
"Guru","Bangalore " Address"

After correction
"Name","Address"
"Guru","Bangalore "" Address"

Now the address coloumn would appear as <Bangalore "
Address> in my letter.

Kindly advice

Thanks
Guru


-----Original Message-----
Not easily :(

The method which works is to open the data source document in Word

Use the replace function to perform a wildcard search for
"([!"])
replace with
\1

This will remove the field separation quotes, leaving the single
quotes (it will leave a final quote at the end of the document
which must be removed by hand if not required there).

Select the text and from the table menu, convert text to table.

Save the document and use it as a datasource for your merge.

--
<>>< ><<> ><<> <>>< ><<> <>>< <>>< ><<>
Graham Mayor - Word MVP

Web site www.gmayor.com
Word MVP web site www.mvps.org/word
<>>< ><<> ><<> <>>< ><<> <>>< <>>< ><<>



Guru wrote:
Hi,

How can I handle double quotes in Mail Merge?
I have datasource file which is like this

"Col1","Col2","Col3"
"abc","23"","xyz"

The above data fails to merge because the second value in
the second row i.e <23"> has a double quote. How can I
handle this problem. I have replaced the double quote with
two double quotes and it worked for me. Is this the right
approach or is their a better way to solve this.

Also, will replacing the double quote with 2 double quotes
result in any mismatch between the columns.

Kindly advice.

Thanks
Guru


.



.
 
G

Guru

Thatz fine..Not a problem.

Microsoft has actually published a article on this issue,
you can have a look at this one
<http://support.microsoft.com/default.aspx?scid=kb;EN-
US;212358>

Thanks
Guru

-----Original Message-----
I see your problem, but I cannot get it to work unless I use a table for the
data source. Unless someone else has a plan, I cannot offer any alternative
suggestion.

--
<>>< ><<> ><<> <>>< ><<> <>>< <>>< ><<>
Graham Mayor - Word MVP

Web site www.gmayor.com
Word MVP web site www.mvps.org/word
<>>< ><<> ><<> <>>< ><<> <>>< <>>< ><<>


Hi,

Actually the methodology that I am following is slightly
different. I have a VB application, which creates the data
source file, and it uses the word API to merge the data
source file with the Mail Merge template. All this happens
programmatically without human intervention. So, I cannot
open the file and manipulate as suggested by you.

Now I have modified my program to replace all double
quotes with two double quotes, which in turn is taken as a
single double quote by Word.

Let me know if this approach is correct.

I can also send a sample template and data source file if
you need.


Thanks
Guru


-----Original Message-----
Did you read *all* of what I wrote in response to your original
query. You need to turn the data file into a table.

--
<>>< ><<> ><<> <>>< ><<> <>>< <>>< ><<>
Graham Mayor - Word MVP

Web site www.gmayor.com
Word MVP web site www.mvps.org/word
<>>< ><<> ><<> <>>< ><<> <>>< <>>< ><<>



(e-mail address removed) wrote:
Hi,
But when I replace double quote with two double quotes,
word is able to merge.

If <Hello!"> is what I want to appear in my word letter
after merging then, if I replace <Hello!"> with
word picks up <Hello!"> by converting two double quotes
into one.

Sample data file

Original data
"Name","Address"
"Guru","Bangalore " Address"

After correction
"Name","Address"
"Guru","Bangalore "" Address"

Now the address coloumn would appear as <Bangalore "
Address> in my letter.

Kindly advice

Thanks
Guru


-----Original Message-----
Not easily :(

The method which works is to open the data source document in Word

Use the replace function to perform a wildcard search for
"([!"])
replace with
\1

This will remove the field separation quotes, leaving the single
quotes (it will leave a final quote at the end of the document
which must be removed by hand if not required there).

Select the text and from the table menu, convert text to table.

Save the document and use it as a datasource for your merge.

--
<>>< ><<> ><<> <>>< ><<> <>>< <>>< ><<>
Graham Mayor - Word MVP

Web site www.gmayor.com
Word MVP web site www.mvps.org/word
<>>< ><<> ><<> <>>< ><<> <>>< <>>< ><<>



Guru wrote:
Hi,

How can I handle double quotes in Mail Merge?
I have datasource file which is like this

"Col1","Col2","Col3"
"abc","23"","xyz"

The above data fails to merge because the second value in
the second row i.e <23"> has a double quote. How can I
handle this problem. I have replaced the double quote with
two double quotes and it worked for me. Is this the right
approach or is their a better way to solve this.

Also, will replacing the double quote with 2 double quotes
result in any mismatch between the columns.

Kindly advice.

Thanks
Guru


.



.


.
 

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