Link to home
Start Free TrialLog in
Avatar of Moshe Singer
Moshe SingerFlag for United States of America

asked on

Microsoft Word 2016 Hebrew Language pack - Using Macro to insert merge field does not display Hebrew characters

Microsoft Word 2016 Hebrew Language pack - I am using a Macro to insert merge fields into a document, but it does not display Hebrew characters. Only after closing and saving the document and then reopening, will it prompt me for the language encoding, and upon selecting Hebrew, it displays the proper Hebrew characters.
I tried selecting in Word in the File menu, Options, Advanced, General, and checked the box "Confirm File Format Conversion on Open" but it does not solve the problem, when using the macro to insert the merge field.
How can I have the proper characters displayed in the first place, upon inserting the merge fields?

By the way, does anyone understand why must I confirm the file format conversion language if the system should know what language I am using being that I installed the Hebrew Language Pack?
Avatar of Joe Howard
Joe Howard
Flag of United States of America image

How did you create your merge source file?
Avatar of Moshe Singer

ASKER

csv, ascii text ,delimited
the source file is exported from access
and after closing and saving the document and then reopening, will it prompt me for the language encoding, and upon selecting Hebrew, it displays the proper Hebrew characters
ASKER CERTIFIED SOLUTION
Avatar of Joe Howard
Joe Howard
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
thanks for your response
here is the code I am using
Please explain where to use your code - and which one of my files must I place instead of the "strFile"

Sub macro()
 On Error GoTo error
   
    ActiveDocument.MailMerge.MainDocumentType = wdFormLetters
     Application.Keyboard (1033)
    ActiveDocument.MailMerge.OpenDataSource Name:= _
        "C:\WORDLeters\detail.csv", ConfirmConversions:=True, ReadOnly:= _
        False, LinkToSource:=True, AddToRecentFiles:=False, PasswordDocument:="", _
         PasswordTemplate:="", WritePasswordDocument:="", WritePasswordTemplate:= _
        "", Revert:=False, Format:=wdOpenFormatAuto, Connection:="", SQLStatement _
        :="", SQLStatement1:=""
    ActiveDocument.MailMerge.EditMainDocument
Exit Sub
error:
Dim Msg, Title, Response, MyString
Msg = msg
Title = title
Response = MsgBox(Msg, , Title)
End Sub
thanks a milion
Did you figure out how to do it?
in place of strFile= I insert the address of the csv file
if you can please  figure out  for me the Hebrew code - I used your code, and the first time it worked, the second time I opend the file it wad damged like a different lang