Word Mailmerge Error

BTBT Member Posts: 3
Hi

I have Nav4 and it makes UTF8 txt. I'm using a special codeunit for that we make document from word-template. Many times the Navision makes the circular letter good, but sometimes sent error message (wrong datafield), that the imported field is wrong. This is a header information, the first field. I looked - I found the UTF8BOM char = . I examed and this time the navision-word doesn't see that the txt file format is UTF-8.

Which command help for me?

The old code:
wrdDoc.MailMerge.OpenDataSource2000(tMergeFileName);

This Helps for me:
ParamInt := 6;
wrdDoc.MailMerge.OpenDataSource2000(tMergeFileName,ParamInt);

WdOpenFormat - wdOpenFormatUnicodeText

Many thanks
<:O)

Comments

  • BTBT Member Posts: 3
    I set a new registry entry, HKCU-software-microsoft-office-11.0-Word-Option
    New - DWORD - DefaultCPG - Decimal - 65001

    This key solved the problem. :D

    BT
    <:O)
Sign In or Register to comment.