I got problem when read a text file that contain japanese characters. I
create this text file by using OutputTo method for export
my access report that contain many japanese characters. Then i want to plop
this text file into email body of OE.
I use this function to read the text file :
Function ReadTxtFile(strFileName As String) As Variant
Dim varText As Variant
Open strFileName For Binary As #1
varText = Input(LOF(1), #1) 'read whole file
Close #1
ReadTxtFile = varText 'set return variable
End Function
But this function can not read japanese character...anyway this only read
the english character...
Is there someone could give some advise or solution with my problem ??? or
repair this function ???
Your help is really appreciated... Please help me !!!
Thx..
david
--
MichKa
Michael Kaplan
(principal developer of the MSLU)
Trigeminal Software, Inc. -- http://www.trigeminal.com/
the book -- http://www.i18nWithVB.com/
"Postmaster" <in...@bali-tours.com> wrote in message
news:#Wu2tvAPBHA.1644@tkmsftngp05...
I will explain in details.... please give me your advise ..
I already have a report for "japanese reservation request" in access, then i
use macro to creaate a text file from this report.
I use "OutputTo" action for creating a text file. The text file will placed
in a directory in my harddrive. This text file contain
english characters also many japanese characters that i want to Plop into
email body directly ( not as an attachment ).
My OS is WIN2K, so when i open it using notepad.. it seems no problem..
because i can see these japanese characters correctly!
Then i used my ReadTxtFile function to read this text file to fill-up this
e-mail body. I use this msoe.dll MAPI setting to send e-mail
from OE. Please see my code below :
Function ReadTxtFile(strFileName As String) As Variant
Dim varText As Variant
Open strFileName For Binary As #1
varText = Input(LOF(1), #1) 'read whole file
Close #1
ReadTxtFile = varText 'set return variable
End Function
Sub TestSendMailwithOE()
Dim aRecips(0 To 0) As String
aRecips(0) = "smtp:davet...@hotmail.com"
SendMailWithOE "Test Send Email from Access",
ReadTxtFile("d:\MyData\test.txt"), aRecips
End Sub
This process run well, but the japanese characters can not read with
ReadTxtFile function.
Please advise me to solve my problem....
Thank you ... (^-^)
David - davet...@hotmail.com
"Michael (michka) Kaplan" <forme...@spamfree.trigeminal.nospam.com> wrote
in message news:eagWLLBPBHA.1496@tkmsftngp03...
--
MichKa
Michael Kaplan
(principal developer of the MSLU)
Trigeminal Software, Inc. -- http://www.trigeminal.com/
the book -- http://www.i18nWithVB.com/
"Postmaster" <in...@bali-tours.com> wrote in message
news:#hooBCCPBHA.580@tkmsftngp05...
I already do shove the binary info into a variant... please see this
function
> > Function ReadTxtFile(strFileName As String) As Variant
> > Dim varText As Variant
> >
> > Open strFileName For Binary As #1
> > varText = Input(LOF(1), #1) 'read whole file
> > Close #1
> > ReadTxtFile = varText 'set return variable
> > End Function
I can send the message from OE, i think my question is How to read text file
that contains japanese characters ?
Could you share me some access code or advise to read this file ?? Please
help...!
Thanks
David - davet...@hotmail.com
"Michael (michka) Kaplan" <forme...@spamfree.trigeminal.nospam.com> wrote
in message news:#iOawGCPBHA.1540@tkmsftngp03...
--
MichKa
Michael Kaplan
(principal developer of the MSLU)
Trigeminal Software, Inc. -- http://www.trigeminal.com/
the book -- http://www.i18nWithVB.com/
"Postmaster" <in...@bali-tours.com> wrote in message
news:#g0#hUCPBHA.404@tkmsftngp03...
Thank's
David
PS: I am a newbie...
"Michael (michka) Kaplan" <forme...@spamfree.trigeminal.nospam.com> wrote
in message news:uBgWI#EPBHA.1548@tkmsftngp03...
--
MichKa
Michael Kaplan
(principal developer of the MSLU)
Trigeminal Software, Inc. -- http://www.trigeminal.com/
the book -- http://www.i18nWithVB.com/
"Postmaster" <in...@bali-tours.com> wrote in message
news:eE6rbSZPBHA.1404@tkmsftngp03...