We've been using VFP with automation to create an Excel file which is then
emailed as an attachment to a group out of state, for several years.

All of a sudden they are no longer able to receive the emails.

Their IT department states that due to the "embedded code" the emails are
being "dumped".

Does automation embed code?

Here is the program code:


***m_hip
wait "Please be patient, running data to Excel" window at 25, 50 nowait
with thisform.stcnthip
        if .sttxtfhip.value <> " "
                mfhip = .sttxtfhip.value
                mlhip = .sttxtlhip.value
                mhips = " stnhorse.hip_no >= mfhip and stnhorse.hip_no <=
mlhip "
        else
                mhips = " (stnhorse.HIP_NO <> ' ' OR  STNHORSE.HIP_NO = ' ')
"
        endif
        if .stcmbcons.value = " "
                mcons = " (stnhorse.cons_no <> ' ' OR STNHORSE.CONS_NO = '
') "
        else
                mcons = " stnhorse.cons_no = .Stcmbcons.value "
        endif
        if .Stchkallmixed.value = 0
                with .stcmbtype
                        do case
                        case .value = " "
                                mtype = " type_horse <> ' ' "
                        case .value = "S"
                                mtype = " type_horse = 'S' "
                        case .value = "Y"
                                mtype = " type_horse = 'Y' "
                        case .value = "W"
                                mtype = " type_horse = 'W' "
                        case .value = "R"
                                mtype = " type_horse = 'R' "
                        case .value = "B"
                                mtype = " type_horse = 'B' "
                        otherwise
                                mtype = " type_horse <> ' ' "
                        endcase
                endwith
        else
                mtype = " type_horse <> 'Y' "
        endif
        select ;
                PADR(chrtran(dam1, " '-", ""),25," ") as nameord, ;
                ARR_NO, ;
                type_horse, ;
                val(stnhorse.hip_no) as hip_no, ;
                proper(stnhorse.name) as name, ;
                tattoo, ;
                lower(stnhorse.color) as color, ;
                iif(stnhorse.sex = "H","c",iif(stnhorse.sex =
"M","f",lower(stnhorse.sex))) as sex,  ;
                lower(stnhorse.gait) as gait, ;
                iif(date_foal <> {}, dtoc(date_foal),dtoc({})) as date_foal,
;
                proper(stnhorse.sire1) as sire1, ;
                proper(stnhorse.dam1) as dam1, ;
                proper(stnhorse.sire2) as sire2, ;
                proper(bred_to) as bred_to, ;
                iif(last_bred <> {}, dtoc(last_bred),dtoc({})) as last_bred,
;
                preg_bar, ;
                maiden, ;
                stnhorse.cons_no as cons_no, ;
                iif(stnconsi.fname<>" ",trim(stnconsi.fname) + " " + ;
                trim(stnconsi.lname),trim(stnconsi.lname)) as consignor,  ;
                alltrim(stnconsi.city) + ", " + alltrim(stnconsi.state) as
citystate, ;
                HBSTB as stable, ;
                hbrw as row, ;
                hbstl as stall, ;
                sire_state, ;
                stnhorse.sbfname, ;
                stnhorse.sblname, ;
                stnhorse.sb_city, ;
                stnhorse.sb_st, ;
                stnhorse.sb_country, ;
        
iif(stnhorse.amount>0,transform(stnhorse.amount,"9,999,999"),"OUT      ") as
amount, ;
                day ;
                from ;
                stnhorse ;
                left join stnconsi on stnhorse.cons_no = stnconsi.cons_no ;
                where ;
                &mcons ;
                and ;
                &mhips ;
                and ;
                &mtype ;
                order by ;
                nameord ;
                into cursor SYS(2015)
*!*     mnumb = 1
*!*     mstart = 'L'
*!*     seek mstart
*!*     scan
*!*             replace stord with mnumb
*!*             mnumb = mnumb + 1
*!*     endscan
        *browse
************************************************************
        oexcel = createobject("excel.application")
        obook = oexcel.workbooks.add()
        orange = oexcel.activesheet.range("a1:p1")
        with oexcel.activesheet
                .range("a1").value = "Type"
                .range("b1").value = "Hip No."
                .range("c1").value = "Name"
                .range("d1").value = "Tattoo"
                .range("e1").value = "Color"
                .range("f1").value = "Sex"
                .range("g1").value = "Gait"
                .range("h1").value = "Date Foal"
                .range("i1").value = "Sire"
                .range("j1").value = "Dam"
                .range("k1").value = "By"
                .range("l1").value = "Bred To"
                .range("m1").value = "Last Bred"
                .range("n1").value = "P/B"
                .range("o1").value = "Maiden"
                .range("p1").value = "Cons#"
                .range("q1").value = "Consignor"
                .range("r1").value = "City/State"
                .range("s1").value = "Arrival#"
                .range("t1").value = "Stb/Barn"
                .range("u1").value = "Row"
                .range("v1").value = "Stall"
                .range("w1").value = "Sire State"
                .range("X1").value = "Sign By First"
                .range("Y1").value = "Sign By Last"
                .range("Z1").value = "City"
                .range("AA1").value = "State"
                .range("AB1").value = "Country"
                .range("AC1").value = "Amount"
                .range("AD1").value = "Day"
                .range("AE1").value = "Name Order"
                orange = orange.offset(1,0)
                scan
                        with orange
                                .columns[1].value = type_horse
                                .columns[2].value = hip_no
                                .columns[3].value = name
                                .columns[4].value = tattoo
                                .columns[5].value = color
                                .columns[6].value = sex
                                .columns[7].value = gait
                                .columns[8].value = date_foal
                                .columns[9].value = sire1
                                .columns[10].value = dam1
                                .columns[11].value = sire2
                                .columns[12].value = bred_to
                                .columns[13].value = last_bred
                                .columns[14].value = preg_bar
                                .columns[15].value = maiden
                                .columns[16].value = cons_no
                                .columns[17].value = consignor
                                .columns[18].value = citystate
                                .columns[19].value = ARR_NO
                                .columns[20].value = stable
                                .columns[21].value = row
                                .columns[22].value = stall
                                .columns[23].value = sire_state
                                .columns[24].value = sbfname
                                .columns[25].value = sblname
                                .columns[26].value = sb_city
                                .columns[27].value = sb_st
                                .columns[28].value = sb_country
                                .columns[29].value = amount
                                .columns[30].value = day
                                .columns[31].value = nameord
                        endwith
                        orange = orange.offset(1,0)
                endscan
                with oexcel.activesheet
                        .columns[1].columnwidth = 5
                        .columns[2].columnwidth = 6.5
                        .columns[3].columnwidth = 20
                        .columns[4].columnwidth = 8.5
                        .columns[5].columnwidth = 3.5
                        .columns[6].columnwidth = 3.5
                        .columns[7].columnwidth = 3.5
                        .columns[8].columnwidth = 8.5
                        .columns[9].columnwidth = 20
                        .columns[10].columnwidth = 20
                        .columns[11].columnwidth = 20
                        .columns[12].columnwidth = 20
                        .columns[13].columnwidth = 8.5
                        .columns[14].columnwidth = 3.5
                        .columns[15].columnwidth = 3.5
                        .columns[16].columnwidth = 7
                        .columns[17].columnwidth = 35
                        .columns[18].columnwidth = 35
                        .columns[19].columnwidth = 6.5
                        .columns[20].columnwidth = 7
                        .columns[21].columnwidth = 7
                        .columns[22].columnwidth = 7
                        .columns[23].columnwidth = 12
                        .columns[24].columnwidth = 35
                        .columns[25].columnwidth = 35
                        .columns[26].columnwidth = 35
                        .columns[27].columnwidth = 10
                        .columns[28].columnwidth = 35
                        .columns[29].columnwidth = 10
                        .columns[30].columnwidth = 3.5
                        .columns[31].columnwidth = 20
                endwith
        endwith
        .stcmbtype.value = " "
        .stcmbcons.value = " "
        .sttxtfhip.value = " "
        .sttxtlhip.value = " "
        .Stchkallmixed.value = 0
        wait clear
        oexcel.visible = .t.
endwith
thisform.refresh
James E Harvey
Hanover Shoe Farms, Inc.
M.I.S./Corresponding Officer
Off: 717-637-8931
fax: 717-637-6766
email: [EMAIL PROTECTED]



_______________________________________________
Post Messages to: ProFox@leafe.com
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/[EMAIL PROTECTED]
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.

Reply via email to