Moshe Singer
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?
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?
How did you create your merge source file?
ASKER
csv, ascii text ,delimited
ASKER
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
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
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
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.M ainDocumen tType = wdFormLetters
Application.Keyboard (1033)
ActiveDocument.MailMerge.O penDataSou rce 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.E ditMainDoc ument
Exit Sub
error:
Dim Msg, Title, Response, MyString
Msg = msg
Title = title
Response = MsgBox(Msg, , Title)
End Sub
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.M
Application.Keyboard (1033)
ActiveDocument.MailMerge.O
"C:\WORDLeters\detail.csv"
False, LinkToSource:=True, AddToRecentFiles:=False, PasswordDocument:="", _
PasswordTemplate:="", WritePasswordDocument:="",
"", Revert:=False, Format:=wdOpenFormatAuto, Connection:="", SQLStatement _
:="", SQLStatement1:=""
ActiveDocument.MailMerge.E
Exit Sub
error:
Dim Msg, Title, Response, MyString
Msg = msg
Title = title
Response = MsgBox(Msg, , Title)
End Sub
ASKER
thanks a milion
Did you figure out how to do it?
ASKER
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
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