using ( blat ) blat.exe in vba
Posted on 2004-04-29
I am trying to use blat in vba using the shell command. Please look at the code I have so far.
1. My first problem was being able to use a subject that had multiple words with spaces. then i figured it out by putting double quotes around the subject line.
2. My next issue is the amount of characters allowed in the subject line. Is it just me or does everyone else only get 14 characters? How can I get more? I do not have this issue while executing blat directly from a command prompt!
3. My final issue and most important is trying to list multiple -to email addresses. I cant use the comma to seperate email addys without vba freaking out. any solutions?
Private Sub Command3_Click()
Dim varMsgBody As String
varMsgBody = "You have received this message because this device failed miserably."
Open "C:\dbms\BlatEmail.txt" For Output As #1
Write #1, varMsgBody
Shell "command.com /c c:\winnt\system32\blat.exe c:\dbms\BlatEmail.txt " _
& "-s ""emergency test"" -t email@example.com -i LayoutDBMS@kotura.com", vbHide