Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Thierry Thoua Thierry Thoua is offline
external usenet poster
 
Posts: 1
Default Problems with mail merge (encoding)

Hello,

I've a "little" problem with Word interop (Office 11). I'd like to
automate the mailmerge.... I've a word file and a .txt file (a csv).
The text file is in UTF-8 encoding.

This is my "code" :

this.document.MailMerge.MainDocumentType =
WdMailMergeMainDocType.wdFormLetters;
this.document.MailMerge.Destination =
WdMailMergeDestination.wdSendToNewDocument;
object subType = WdMergeSubType.wdMergeSubTypeOther;
object format = WdOpenFormat.wdOpenFormatUnicodeText;
object confirmConversions = false;
this.document.MailMerge.OpenDataSource(cheminFichi er, ref
format, ref confirmConversions, ref ComWrapper.OpenDocumentAsReadOnly,
ref
ComWrapper.Missing, ref ComWrapper.Missing, ref ComWrapper.Missing,
ref ComWrapper.Missing,
ref
ComWrapper.Missing, ref ComWrapper.Missing, ref ComWrapper.Missing,
ref ComWrapper.Missing,
ref
ComWrapper.Missing, ref ComWrapper.Missing, ref ComWrapper.Missing,
ref subType);

document.MailMerge.Execute(ref ComWrapper.Missing);
object index = 1;
_Document mailMergeResult = this.word.Documents.get_Item
(ref index);

It works fine ... BUT .. Sometimes when I load a lot my service ...
The word doesn't use the "utf-8" encoding ... Word use "Windows
standard (default)" = When I execute the mail merge ... I've a window
with a wrong key "ïMyKey" and not "MyKey" .... What's wrong ???

Do you have any idea ?

Thanks
 
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 problems. CD Tom Microsoft Word Help 0 May 1st 08 11:53 PM
Mail merge problems Can only mail merge one field at a time. New Users 1 August 17th 07 10:14 PM
Mail Merge Problems Mike G New Users 3 June 13th 07 05:35 PM
encoding problems in Word 2002 Mir Microsoft Word Help 5 September 28th 06 04:53 PM
Mail merge e-mail character encoding Michael Lee Mailmerge 2 August 10th 06 10:44 AM


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