French characters become Chineses charactors in merge fields in Word XP template

M

Mary

Hi,

I've a group of Word templates with both merge fields and
static text on them. I use stored procedures to retrieve
data from Microsoft SQL server database to populate the
merge fields. Sometimes the data is in French, such as:
Québec or Montréal.

All this works fine with Word 2000.

But after I converted those templates to Word 2002 (XP),
I've been getting the problems:
The French characters I retrieve from database and put in
the merge fields become Chinese or Japanese characters on
the templates, such as: Qu饕ec or Montr饌l.

Would you please help me to resolve this problem?

Thank you very much!

Mary
 
P

Peter Jamieson

Can you tell us how you are connecting your mail merge main documents to the
stored procedure(s) ?

--
Peter Jamieson - Word MVP
Word MVP web site http://word.mvps.org/

Hi,

I've a group of Word templates with both merge fields and
static text on them. I use stored procedures to retrieve
data from Microsoft SQL server database to populate the
merge fields. Sometimes the data is in French, such as:
Québec or Montréal.

All this works fine with Word 2000.

But after I converted those templates to Word 2002 (XP),
I've been getting the problems:
The French characters I retrieve from database and put in
the merge fields become Chinese or Japanese characters on
the templates, such as: Qu饕ec or Montr饌l.

Would you please help me to resolve this problem?

Thank you very much!

Mary
 
M

Mary

I'm not sure how the mail merge main documents connect to
stored procedures. I only know the following:

Our front end application is PowerBuilder, the back end
database is MS SQL Server. PowerBuilder connects SQL
Server using native driver. PowerBuilder opens Word 2002
and call stored procedures to populate merge fields.

There is a clue might be helpful: the French characters
show in the merge fields on some templates, but not the
others.

Where/what should I check to find out how the mail merge
main documents connect to stored procedures? What kind of
connect affects the French characters?



Your help will be very much appreciated.

Mary
 
P

Peter Jamieson

I am guessing, but I think there are two main possibilities:

1. PowerBuilder is retrieving all the data, and is inserting it directly
into Word. In other words, you are not actually using MailMerge.

2. PowerBuilder is setting up queries, then Automating Word to connect to
SQL Server and do a MailMerge.

If it is case (2) then it is possible that each Word template is making the
connection a different way - for example one might use OLEDB, the other
might use ODBC. If it is case (1) then I cannot even guess what might be
going wrong.

Either way, it is going to be difficult to find out without knowing how Word
is connecting, and
a. that might be quite hard to find out if PowerBuilder is setting up the
connections "on-the-fly"
b. unfortunately some problems in Word 2002 make it quite hard to find out
anyway.

If you are able to post any of the relevant PowerBuilder code here, that
might help. Otherwise, are you able to interrupt the merge process and save
the Mail Merge Main documents? If so, you could save one of the "working"
documents, and one of the "non-working" documents as Web pages (i.e. in
HTML). Then open each one in Notepad and you should find the information
about how the connection was made fairly near the top of the file. Again,if
you could post that info. here or despam my e-mail address and e-mail it to
me, We may be able to see what is going on.

--
Peter Jamieson - Word MVP
Word MVP web site http://word.mvps.org/

I'm not sure how the mail merge main documents connect to
stored procedures. I only know the following:

Our front end application is PowerBuilder, the back end
database is MS SQL Server. PowerBuilder connects SQL
Server using native driver. PowerBuilder opens Word 2002
and call stored procedures to populate merge fields.

There is a clue might be helpful: the French characters
show in the merge fields on some templates, but not the
others.

Where/what should I check to find out how the mail merge
main documents connect to stored procedures? What kind of
connect affects the French characters?



Your help will be very much appreciated.

Mary
 
M

Mary

Thank you so much Peter for your help!

I've done some investigation and found:
The connection is through an OLE Server version of Word 97
running in batch mode(according the document). The Word
template file is opened using an OLE server command. When
the application was created, it was Word 97. Later we
migrated to Word 2000, there was not any problem.

Those Word templates have mail merge type set
to 'catalog'. Data source are not set. I guess
PowerBuilder decides the data source.

The strange thing is some templates work fine, but some
not. I tried to copy-paste merge fields from a template
which is not good to a template which works fine. But the
problem is still there.

The problem not only heppens to French characters with
accents, but also heppens when the data in merge field has
words like Let's or Driver's.

Are these helpful? Please let me know if you have any
questions.

Thank you once again!

Mary
 
P

Peter Jamieson

I am going to do one or two experiments here, but meanwhile...
a. if you create a completely new template using Word 2002, do you always
see the correct characters, always see the incorrect characters, or what?
b. is it possible that the templates that do work have been /saved/ using
Word 2002, whereas the templates that do not have only been opened and
discarded, never saved? Or vice versa?

--
Peter Jamieson - Word MVP
Word MVP web site http://word.mvps.org/

Thank you so much Peter for your help!

I've done some investigation and found:
The connection is through an OLE Server version of Word 97
running in batch mode(according the document). The Word
template file is opened using an OLE server command. When
the application was created, it was Word 97. Later we
migrated to Word 2000, there was not any problem.

Those Word templates have mail merge type set
to 'catalog'. Data source are not set. I guess
PowerBuilder decides the data source.

The strange thing is some templates work fine, but some
not. I tried to copy-paste merge fields from a template
which is not good to a template which works fine. But the
problem is still there.

The problem not only heppens to French characters with
accents, but also heppens when the data in merge field has
words like Let's or Driver's.

Are these helpful? Please let me know if you have any
questions.

Thank you once again!

Mary
 

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