Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

QlikView Fans! We’d love to hear from you.
Share your QlikView feedback with the product team… Click here to participate in our 5-minute survey.
Rules, plus terms and conditions, can be found here.
Not applicable

Send mail with attached file (Macro VB)


I want to send mail from a boutton in QV with attached file. I create a macro but I have an error msg " Un composant ActiveX ne peut pas créer un objet: 'CDO.Message'".!! I use outlook to send mail.

this is the macro:

sub Send()

Set objMessage = CreateObject("CDO.Message")

set objConf = CreateObject("CDO.Configuration")

objMessage.Subject = "Tester l'envoi    "

objMessage.From = "admin@adress.com"

objMessage.To = "myadress@me.com"

objMessage.TextBody = "This is a test message text."

'==This section provides the configuration information for the remote SMTP server.

'==Normally you will only change the server name or IP.

objMessage.Configuration.Fields.Item _

("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2

'Name or IP of Remote SMTP Server

objMessage.Configuration.Fields.Item _

("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "smtp.me.com"

'Server port (typically 25)

objMessage.Configuration.Fields.Item _

("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25


'==End remote SMTP server configuration section==


end sub

1 Reply
Honored Contributor III

Re: Send mail with attached file (Macro VB)



Community Browser