Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
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 | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Mail Merge problems. | Microsoft Word Help | |||
Mail merge problems | New Users | |||
Mail Merge Problems | New Users | |||
encoding problems in Word 2002 | Microsoft Word Help | |||
Mail merge e-mail character encoding | Mailmerge |