Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Script for Exporting and Sending email

Hi Everybody,

Please help me the script to export the Qlikview documents into Excell/PDF file and the script to send email in Qlikview environment.

Many thanks,

Tai.

85 Replies
eliran
Creator III
Creator III

Hi Roby,

What seems to be the problem?

Eliran.

Not applicable
Author

I had the same isue with one qvd (I have about 50 automated qvd-reports).

In the module-editor, are both security-settings set to system ?

In documentsettings, tab 'security', I enabled everything.

Jochen

Not applicable
Author

I can't connect with server . . .  The only defference with Jochen script are smtpusessl = True and data for autentication . . .

@Jochen both secure-settings se to system

eliran
Creator III
Creator III

Hi,

Here are my settings for sending mail from gmail:

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") = "YourMail"

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

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

msgConf.Fields.Update

  ' Email

  objMsg.To = "Whoever"

  objMsg.From = "YourMail"

  objMsg.Subject = "Subject"

  objMsg.HTMLBody = "Body"

  objMsg.Sender = "YourName"

' If you have attachment

          Path ="Report Path"

          FileName="ReportFileName"

          objMsg.AddAttachment Path&FileName

  Set objMsg.Configuration = msgConf

  ' Send

  objMsg.Send

  ' Clear

  Set objMsg = nothing

  Set msgConf = nothing

End Sub

I hope it helps,

Eliran.

Not applicable
Author

Ok, I resolve. At job I can't use gmail and in my my mail server I not have to autenticate me.

Thank you all

Not applicable
Author

Hi,

I used this code in my application and it worked fine in a 32bit windows xp computer but when I run my application on windows 7 64bit i got a message "ActiveX Component can't create object: 'Bullzip.PDFPrinterSettings' "

why and how can i solve this??

thank you!

Not applicable
Author

In which row of the macro?

Anonymous
Not applicable
Author

Thank you very much Jochen, this macro works perfectly for me under my win7 32 bits operating system with qv10. Now, i'll try to execute it from some trigger in the server...

i'll report advance.

Not applicable
Author

You're welcome !!

Indeed, as long as you work with a 32bit Windows, all goes well.  I can't find the solution for the 64bit-problem 😞

I installed a virtual-32bit-machine to make the magic happening.

udaya_kumar
Specialist
Specialist

hi jochen,

Is it possible to export qlikview objects to powerpoint dynamically and send mail to others?

and the sent ppt or pptx file should work even in their system.

Is it possible to do that? can you help me ?