>PrSenderEmail = &H0C1F001E
>?sItem.Fields(PrSenderEmail)
>
>
&H0C1F001E is a hexadecimal value, in VFP you use the form 0x... in stead of &H..., so &H0C1F001E in VB equals 0x0C1F001E in VFP. 0x0C1F001E equals 203358238. It is common to use hexadecimal values as constants (for some reason). The most usual way to use these kind of constants is to #DEFINE them.#DEFINE PrSenderEmail 0x0C1F001E ?sItem.Fields(PrSenderEmail)Note that you can not use #DEFINE in the command window.
Function SendEMail Lparameters lcTo, lcSubject, lcBody, lcBCC Local loOutlook, loNameSpace, loFolder, loItem,loSafeItem,lcCurDir If Type('lcBody') != 'C' Or Type('lcSubject') != 'C' Or Type('lcTo') != 'C' Return .F. Else lcCurDir = Sys(5) + Sys(2003) If Vartype(lcBCC)#'C' lcBCC='' Endif loOutlook = Createobject('Outlook.Application') loNameSpace = loOutlook.GetNameSpace('MAPI') loSafeItem = Createobject('redemption.safeMailItem') loItem = loOutlook.Createitem(0) With loSafeItem .Item=loItem .body=lcBody .To=lcTo .bcc=lcBCC Endwith With loItem .SUBJECT = lcSubject .IMPORTANCE = 1 && 1 = Normal Endwith loSafeItem.Send Cd (lcCurDir) Release loItem Release loSafeItem Release loFolder Release loNameSpace Release loOutlook Release lcCurDir Return .T. Endif Endfunc