Respected/Dear Sir,

Hello,

Sir,

I need to print in hindi text (already saved in hindi mangal font)through MS Access VBA output file(print #) on dotmatrix printer.
i have installed language bar and set hi(hindi)
i can type in hindi and save in hindi through my ms access program.
but when print through generating output text file it shows ?????? instead of hindi text


msgbox output window also shows ????? for text saved in hindi

please suggest solution so that i could print in hindi


thanks & regards,

from:

Naresh
Sukhpur


please check code:
Private Sub Dupl_Click()

On Error GoTo ducl

' DoCmd.OpenReport "small_slip_dup", acViewPreview
'a = IIf(Trim(rs.Fields("OPD_Desc")) Like "Reference", " By" & rs.Fields("Refering_Doctor"), "")
' MsgBox a
' Exit Sub

Dim db As DAO.Database
Dim rs As Recordset

Set db = CurrentDb

Set rs = db.OpenRecordset("SELECT * from [slip_Data];")

Open "PT_Reg.txt" For Output As #5

'Print #5, ""
'Print #5, ""
'Print #5, ""
Print #5, " Duplicate "
Print #5, " Duplicate "
Print #5, " Duplicate "
Print #5, " Duplicate "
MsgBox "????" & "<FONT=mangal>"
Print #5, Space(31) & Chr(15) & Chr(14) & rs.Fields("Category") & IIf(rs.Fields("category") Like "*camp*", "::" & rs.Fields("camp_id"), "") & "-" & rs.Fields("Opd_time") & ":" & rs.Fields("OPD_Desc") & Chr(18)
'Print #5, ""
' Print #5, ""
'Print #5, ""
Print #5, Space(17) & Chr(15) & Chr(14) & Format(rs.Fields("E_Date"), "dd-mm-yy") & Space(10) & rs.Fields("Host_Name") & Space(9) & rs.Fields("Dr_RoomNo") & Chr(18)
Print #5, ""

Print #5, Space(16) & Chr(15) & Chr(14) & rs.Fields("patient_id") & Chr(18) & Space(6) & rs.Fields("PT_Name"); "<FONT=mangal>"
Print #5, ""
Print #5, Space(21) & Chr(15) & Chr(14) & rs.Fields("OPDNO") & Chr(18)

' Print #5, ""
Print #5, ""
Print #5, Space(14) & Chr(15) & Chr(14) & rs.Fields("Age") & Space(7) & UCase(rs.Fields("Sex")) & Space(13) & Chr(15) & Chr(14) & UCase(rs.Fields("Village")) & "/" & UCase(rs.Fields("city")) & Chr(18)
Print #5, ""
Print #5, Space(18) & IIf(Trim(rs.Fields("OPD_Desc")) Like "Reference", " By " & rs.Fields("Refering_Doctor"), "")
Close #5

rs.close

ans = MsgBox("Do you want to print or view", vbYesNo)

If (ans = vbYes) Then
Open "prt1.bat" For Output As #5
Print #5, "@echo off"
'Print #5, "cd\"
Print #5, "print PT_Reg.txt"
Print #5, "exit"
Close #5
ret = Shell("prt1.bat", vbHide)
Else
Shell ("notepad.exe PT_Reg.txt")



End If

Close

ducl:
End Sub