Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Highlighted
Not applicable

Sending reports to a specified email id through macro

Hello Friends,

Kindly, if possible can I have some vb-script macro code examples to send a report from my desktop application to  a specified email address??

Regards,

Kiru

3 Replies
Not applicable

Re: Sending reports to a specified email id through macro

Hi

its possible but i dont have it right now try in community u will get here

Not applicable

Re: Sending reports to a specified email id through macro

Hi ,

Sub SendGMail()  

 

' Object creation  

Set objMsg = CreateObject("CDO.Message")  

Set msgConf = CreateObject("CDO.Configuration")  

 

' Server Configuration  

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

msgConf.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "smtp.gmail.com"  

msgConf.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 465  

msgConf.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = 1  

msgConf.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendusername") = "user@gmail.com"  

msgConf.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendpassword") = "password"  

msgConf.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpusessl") = 1  

msgConf.Fields.Update  

 

' Email  

objMsg.To = "user@gmail.com"  

objMsg.From = "fromuser@domain.com"  

objMsg.Subject = "Test send with Gmail account"  

objMsg.HTMLBody = "HTML/Plain text message."  

objMsg.Sender = "Mr. Name"  

 

Set objMsg.Configuration = msgConf  

 

' Send  

objMsg.Send  

 

' Clear  

Set objMsg = nothing  

Set msgConf = nothing 

  1. End Sub 

Re: Sending reports to a specified email id through macro

Hi,

Check this

Regards

ASHFAQ