Office中国论坛/Access中国论坛

标题: 加密,解密问题? [打印本页]

作者: ljwei692    时间: 2003-10-13 23:39
标题: 加密,解密问题?
现通过用ACCESS发送邮件到员工信箱,能不能对发送的报表内容进行加密,解密?


[此贴子已经被作者于2003-10-13 15:39:18编辑过]


作者: ljwei692    时间: 2003-10-14 00:03
补充:即需要对*.snp内容进行加密,加密方式任意。

附:DoCmd.SendObject acReport, "ayslip_2003", "SnapshotFormat(*.snp)", EmailAddr, "", "", subject, body, False, "
作者: ljwei692    时间: 2003-10-14 00:36
GG们:帮忙看看吧,给点思路好吗?
作者: goodidea    时间: 2003-10-14 00:45
用winrar/winzip打包 就可以加密了
作者: ljwei692    时间: 2003-10-14 00:49
我是想在下面代码中能够自动完成,通过代码能够实现吗?


源代码如下:
'------------------------------------------------------------
' sendmail
'------------------------------------------------------------
function sendmail(id as integer, username as string, emailaddr as string)
on error goto sendmail_err
    'dim id as integer
    dim cont as string 'condition for open report
    dim subject as string
    cont = "[id]=" & id
    subject = username & ",please find attached your pay slip for " & month(now())
    docmd.setwarnings false
    docmd.openreport "report_2003", acpreview, "", cont
    docmd.sendobject acreport, "report_2003", "snapshotformat(*.snp)", emailaddr, "", "", subject, "", false, ""
    docmd.close acreport, "report_2003"


sendmail_exit:
    exit function

sendmail_err:
    msgbox err.description
    resume sendmail_exit

end function


send 按钮单击事件代码
private sub send_click()
on error goto err_send_click
    dim db1 as dao.database
    dim user as dao.recordset
   
    set db1 = application.currentdb
    set user = db1.openrecordset("transfer", dbopentable)
   
    dim failuser as string
    failuser = "there some user's email is empty!  "
    with user
        do while not user.eof
            if isnull(![e-mail address]) then
                failuser = failuser & "      " & ![employee name]
            else
                sendmail ![id], ![employee name], ![e-mail address]
            end if
            .movenext
        loop
    end with
    msgbox failuser
exit_send_click:
    exit sub

err_send_click:
    msgbox err.description
    resume exit_send_click
end sub

高手帮帮忙吧!

作者: ljwei692    时间: 2003-10-14 00:54
我发送的只是ACCESS中的一个REPORT,也就是要发送给很多人不同的内容(根据表格相应内容自动变换),为了更简便、更高效地完成这个工作。
作者: ljwei692    时间: 2003-10-14 21:33
兄弟们:谁帮忙给看看吧,我现在一点思路都没有。




欢迎光临 Office中国论坛/Access中国论坛 (http://www.office-cn.net/) Powered by Discuz! X3.3