DTS Absolute Path during "Send Mail" Task

  • I have a DTS job that attachs an Excel file from a network drive and emails it to external users.  The external users get the email, however it has the full path name.  How can I get the file to attach as "regular" ?

  • You can add and activex scripts like this

    '**********************************************************************

    '  Visual Basic ActiveX Script

    '************************************************************************

     

    Function Main()

    Dim iMsg

     

    set iMsg = CreateObject("CDO.Message")

     

    Dim objMail   

    Set objMail = CreateObject("CDO.Message")

     

    objMail.From = "username@somewhere.com"

    'objMail.To ="jaimemaccou@colliergov.net"

    objMail.To ="one@somewhere.com,two@somewher.com"

    objMail.AddAttachment ("\\servername\driveletter$\folder\filename.xls")

    objMail.Subject="your subject here"

    objMail.TextBody = "Body Test here"

    objMail.Send

    Set objMail = nothing

     

    Main = DTSTaskExecResult_Success

    End Function

     

  • That worked great.

    Thanks for the info.

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply