Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
idogridish2
Creator III
Creator III

using macro to send email with attachments

hello everyone,

i am new to qlikview and i want to send an email by macro function

with attachment of a csv file that allready exists on my computer.

i have a simple macro in excel and it works fine.

i want to call the function in the end of my qvw script.

here is my excel macro function:

Sub Mail_Outlook()

Dim OutApp As Object

Dim OutMail As Object

'Send Mail

        Set OutApp = CreateObject("Outlook.Application")

        Set OutMail = OutApp.CreateItem(o)

        With OutMail

            .Subject = MailSubject

            .To = "myname@gmail.com"

            .body = MailBody

            .Attachments.Add "D:\ex1.xlsx"

            '.Display

            .Send

        End With

        Set OutMail = Nothing

        Set OutApp = Nothing

End Sub

please help.

best regards to all and thanks in advence.

3 Replies
Anonymous
Not applicable

idogridish2
Creator III
Creator III
Author

hi balrajahlawat yes i have checked those forums.

all i want is a simple code like i wrote for excel above.

thank you.

Colin-Albert
Partner - Champion
Partner - Champion

The other option is to look at NPrinting, the desktop version can do this without the need for macros.