John Bodin
jbodin at sbor.com
Tue Oct 21 08:37:12 CDT 2014
Fantastic Stuart. Will give this a bid. John Bodin ________________________________________ From: accessd-bounces at databaseadvisors.com <accessd-bounces at databaseadvisors.com> on behalf of Stuart McLachlan <stuart at lexacorp.com.pg> Sent: Tuesday, October 21, 2014 9:17 AM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Ten most common tasks/problems in Access On 21 Oct 2014 at 12:15, John Bodin wrote: > Hi Stuart, > > Do you have the declare statement you would include in Access for the > DLL and a sample call? I've used the .Exe in the past but would > rather not have to shell out to run it if I can use the DLL > references. I couldn't find the info on the yahoo board nor in the > blat Zip file (just updated a few days ago) so if you get a chance and > can dig up the info, that would be much appreciated. > The syntax for the DLL is just the same as for the Exe. One thing to be careful of is only have a single space between parameters ( Not sure if that still applies, but earlier versions of the DLL had problems if you had multiple spaces). Here's a simple one which builds a plain text message. Declare Function SendBlat Lib "blat.dll" Alias "Send" (ByVal sCmd As String) As Integer ... Function SendMsg(message As String, address As String) As Long Dim shellstr As String Open "Message.txt" For Output As #1 Print #1, message Close #1 shellstr = "Message.txt -to " & address & " -SERVER mail.camcopng.com -f survey at camcopng.com.pg" shellstr = shellstr & " -s " & Chr$(34) & "Program Survey" & Chr$(34) & " -O ""CAMCo Ltd""" shellstr = shellstr & " -log BlatLog.txt -noh2" SendBlat shellstr End Function -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com