Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.mailmerge.fields
[email protected] dhwanitdesai@gmail.com is offline
external usenet poster
 
Posts: 2
Default Unicode characters problem in MailMerge using Excel

Hey...

I'm having problem displaying double-byte characters using mail merge
functionality. In my application, we're using Excel sheet as a
datasource for a word template document. We open a datasource using
OpenDatasource method. But when spreadsheet column has a double-byte
characters in its data, in Word document, when we merge the field, it
displays lots of "?" instead.

Data is being displayed fine in spreadsheet.

Also, when I manually open a datasource from a word for the same
spreadsheet and then merge fields, data is perfect. It doesn't display
garbages....

Any ideas/suggestions is appreciated.

Thanks,
- Dhwanit

  #2   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Peter Jamieson Peter Jamieson is offline
external usenet poster
 
Posts: 4,582
Default Unicode characters problem in MailMerge using Excel

Which version of Word/Excel, and can you show the code for your
OpenDataSource please?

Peter Jamieson
wrote in message
oups.com...
Hey...

I'm having problem displaying double-byte characters using mail merge
functionality. In my application, we're using Excel sheet as a
datasource for a word template document. We open a datasource using
OpenDatasource method. But when spreadsheet column has a double-byte
characters in its data, in Word document, when we merge the field, it
displays lots of "?" instead.

Data is being displayed fine in spreadsheet.

Also, when I manually open a datasource from a word for the same
spreadsheet and then merge fields, data is perfect. It doesn't display
garbages....

Any ideas/suggestions is appreciated.

Thanks,
- Dhwanit



  #3   Report Post  
Posted to microsoft.public.word.mailmerge.fields
[email protected] dhwanitdesai@gmail.com is offline
external usenet poster
 
Posts: 2
Default Unicode characters problem in MailMerge using Excel

On Mar 16, 12:42 pm, "Peter Jamieson"
wrote:
Which version of Word/Excel, and can you show the code for your
OpenDataSource please?

Peter wrote in message

oups.com...



Hey...


I'm having problem displaying double-byte characters using mail merge
functionality. In my application, we're using Excel sheet as a
datasource for a word template document. We open a datasource using
OpenDatasource method. But when spreadsheet column has a double-byte
characters in its data, in Word document, when we merge the field, it
displays lots of "?" instead.


Data is being displayed fine in spreadsheet.


Also, when I manually open a datasource from a word for the same
spreadsheet and then merge fields, data is perfect. It doesn't display
garbages....


Any ideas/suggestions is appreciated.


Thanks,
- Dhwanit- Hide quoted text -


- Show quoted text -


Hey....We're using office 2003 SP2 for word and excel both...as far
as code goes, call is right here...

ODBC:

m_doc.MailMerge.OpenDataSource(Name:="", _
Connection:="DSN=Excel Files;DBQ=" &
m_strDsName & ";", _
SQLStatement:="SELECT * FROM `Sheet1$`", _
SubType:=WdMergeSubType.wdMergeSubTypeWord2000)

DDE:
m_doc.MailMerge.OpenDataSource( _
Name:=m_strDsName, _
Connection:="Entire Spreadsheet", _

SubType:=WdMergeSubType.wdMergeSubTypeWord2000)

Thanks....
Dhwanit

  #4   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Peter Jamieson Peter Jamieson is offline
external usenet poster
 
Posts: 4,582
Default Unicode characters problem in MailMerge using Excel

Unless you really are dealing with "older-style" double-byte characters, the
problem is that neither ODBC nor DDE will preserve Unicode characters (which
I know is not necessarily the same thing, but is likely to be what needs to
come across regardless of what encoding you think you are using. You really
have to use OLE DB (the default connection method in Word 2003) to do that -
I would suggest:

OLEDB:

m_doc.MailMerge.OpenDataSource(Name:=m_strDsName, _
Connection:="", _
SQLStatement:="SELECT * FROM `Sheet1$`"

Although I don't hink it has any particular bearing on this issue, you might
also find some of http://tips.pjmsn.me.uk/t0003.htm useful

Peter Jamieson

wrote in message
ups.com...
On Mar 16, 12:42 pm, "Peter Jamieson"
wrote:
Which version of Word/Excel, and can you show the code for your
OpenDataSource please?

Peter wrote in message

oups.com...



Hey...


I'm having problem displaying double-byte characters using mail merge
functionality. In my application, we're using Excel sheet as a
datasource for a word template document. We open a datasource using
OpenDatasource method. But when spreadsheet column has a double-byte
characters in its data, in Word document, when we merge the field, it
displays lots of "?" instead.


Data is being displayed fine in spreadsheet.


Also, when I manually open a datasource from a word for the same
spreadsheet and then merge fields, data is perfect. It doesn't display
garbages....


Any ideas/suggestions is appreciated.


Thanks,
- Dhwanit- Hide quoted text -


- Show quoted text -


Hey....We're using office 2003 SP2 for word and excel both...as far
as code goes, call is right here...

ODBC:

m_doc.MailMerge.OpenDataSource(Name:="", _
Connection:="DSN=Excel Files;DBQ=" &
m_strDsName & ";", _
SQLStatement:="SELECT * FROM `Sheet1$`", _
SubType:=WdMergeSubType.wdMergeSubTypeWord2000)

DDE:
m_doc.MailMerge.OpenDataSource( _
Name:=m_strDsName, _
Connection:="Entire Spreadsheet", _

SubType:=WdMergeSubType.wdMergeSubTypeWord2000)

Thanks....
Dhwanit



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
Will Word mailmerge more than 255 characters from an Excel file? OkieStateLynn Mailmerge 4 February 7th 07 11:29 PM
Unicode problem rhorton33704 Microsoft Word Help 4 October 7th 06 06:06 PM
"change case" not working for Unicode characters Ramesh Srinivasan Microsoft Word Help 1 August 7th 05 10:43 AM
zipcode problem with mailmerge using excel. pamsf Mailmerge 1 May 10th 05 04:46 PM
Mailmerge from EXCEL, custom format problem TonyB Mailmerge 1 December 1st 04 05:41 PM


All times are GMT +1. The time now is 11:52 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"