PARAMETERS pcTo, pcFaxNumber, pcSubject, pcCoverSheet, pnFollowUpId, paFichEnviar, pcName LOCAL gcOldDir gcOldDir = SET('DEFAULT') + SYS(2003) IF TYPE('pnFollowUpId') = 'L' =MESSAGEBOX("FollowUp_id is not Valid. EnviarFax() method",29,"Fax Transmission") RETURN .F. ENDIF ***************************************************************************** *-- Preceed to update the FollowUp table to reflect that the FAX was sent. *-- Use pnFollowUpId to update record lcArg = "msgsent = " + '"'+ ALLTRIM(STR(1)) + '"' lcDisc = "nFollowUp_id = "+ '"' + ALLTRIM(STR(pnFollowUpId)) + '"' lcUpdateString = "usp_datahandler U , 'followup','"+lcArg+"' , '" + lcDisc + "' " lnUpdateStatus = SQLEXEC(oApp.nConnectionHandle, lcUpdateString,'curRct') IF !(IIF(lnUpdateStatus > 0 , .T., .F.)) =MESSAGEBOX("Could't Update FollowUp table. Please contact Customer Support!",29,"Update Failed") RETURN .F. ENDIF oZfAPI = CREATEOBJECT("zfAPI32.ZfAPI") oUserSession = oZfAPI.Logon("SORTIZ", .f.) oNewMessage = oUserSession.CreateNewMsg() lcUser = "Fulton Agency" oNewMessage.Recipients.AddFaxRecipient(pcTo,lcUser, pcFaxNumber) oNewMessage.Subject = pcSubject oNewMessage.From = pcName oNewMessage.Files.Add(paFichEnviar) && Add an Attachement oNewMessage.Send() && Send the message SET DEFAULT TO (gcOldDir)Sergio