If you can help me, I appreciate it, otherwise maybe you can refer me to someone.
I am calling blat.exe thru visual basic via shell command. How can I get blat to return an error back to my program or via text file or something.
Here is my code:
Dim strPageCommand As String
Dim pstrAppPath As String
Dim pstrEmailTo As String
Dim pstrEmailFrom As String
Dim pstrSubject As String
Dim pstrAttachment As String
Dim dblResult As Double
Dim A As Integer
Dim pstrAppPathofBlat As String
pstrAppPathofBlat = App.Path & "\blat.exe "
pstrEmailTo = "***@comerica.com, ***@comerica.com, ***@comerica.com"
pstrEmailFrom = "***@comerica.com"
pstrSubject = "***TEST CSRVIEW RUSH REQUEST "
pstrAttachment = App.Path & "\request.rtf"
pstrAttachment = "request.rtf"
' strPageCommand = "c:\csrview\blat.exe C:\csrview\message.TXT -to ""***@comerica.com"" -attach ""c:\csrview\request.rtf"" -server 10.7.5.27 -port 25 -subject ""This is a test"" -f ""***@comerica.com"" -try 1"
strPageCommand = pstrAppPathofBlat & Chr$(34) & pstrAppPath & "message.txt" & Chr$(34) & " " _
& "-to " & Chr$(34) & pstrEmailTo & Chr$(34) & " " _
& "-server 10.7.5.27 -port 25 " _
& "-subject " & Chr$(34) & pstrSubject & Chr$(34) & " " _
& "-attach " & Chr$(34) & pstrAttachment & Chr$(34) & " " _
& "-f " & Chr$(34) & pstrEmailFrom & Chr$(34) & " " _
& "-try 1"
dblResult = Shell(strPageCommand, vbMaximizedFocus)
--- On Wed, 10/1/08, Tim Musson <***@ameritech.net> wrote:
From: Tim Musson <***@ameritech.net>
Subject: Re: [blat] non-ASCII support
To: "Robert Vanyi" <***@yahoogroups.com>
Date: Wednesday, October 1, 2008, 12:52 PM
Post by Tim Musson
RV> I'm just trying to use blat.exe in an internationalized environment,
RV> which means, I may have non-ASCII / non-English characters in the
C:\>blat ???.txt -to robert.vanyi@ ...
RV> Blat v2.6.2 w/GSS encryption (build : Feb 25 2007 12:06:19)
RV> unknown error code 123 when trying to open ???.txt
RV> If your mailer doesn't display the filename correctly, it is a
RV> japanese string with three characters:
RV> katakana TE (U+30C6)
RV> katakana SU (U+30B9)
RV> katakana TO (U+30C8)
RV> from this page:
RV> http://ja.wikipedia .org/wiki/ %E3%83%86% E3%82%B9% E3%83%88
RV> This is a UTF-16 string, which can only be handled correctly, if the
RV> application (in our case blat) has a wmain function. I was browsing
RV> the code, but I could only find a main function, which means every
RV> command-line parameter is converted to the local codepage. However
RV> Japanese characters are not in the English codepage, resulting in
RV> placeholder characters (question marks).
My client did display the chars correctly, but I can't send them
RV> If it is the case, blat won't be able to handle command-line
RV> parameters that are not in the local codepage.
What does adding -charset UTF-16 to your command line do for you? I am
not sure it will work for you, but I did find it in the list archives.
You can just search for UIT-16 in this lists archive to read the
Flying with The Bat! eMail v3.99.29
They say you can't have too much of a good thing, wish I'd been part
of that study.
Blat Manager, current version is 2.6.2, see www.blat.net
[Non-text portions of this message have been removed]