Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
hi ,
i very urgently need to know how to send a table from Qlikview , in a outlook mail body , through a macro .
Also i have a list of project leads , for each project lead ther are many records , i wish to mail each project lead a table having information of his records .
urgent assistance required .
'// ****************************************************************
'// Enviador Mails Pegados Cuerpo
'// ****************************************************************
sub SendMail
if Time()>TimeValue("10:15:00") and Time()<TimeValue("21:30:00")Then
' Object creation
Set objMsg = CreateObject("CDO.Message")
Set msgConf = CreateObject("CDO.Configuration")
strDate = CDate(Date)
set cs = ActiveDocument.GetSheetObject("CH80")
cs.ExportHtml "C:\Directory\Pruebas\informe.html"
objMsg.CreateMHTMLBody "file://C:\Directory\Pruebas\informe.html"
' Server Configuration
msgConf.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
msgConf.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "server***********"
msgConf.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25
msgConf.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = 1
msgConf.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendusername") = "mimai********l"
msgConf.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendpassword") = "pass******"
msgConf.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpusessl") = 1
msgConf.Fields.Update
objMsg.To = "mmail***********"
objMsg.From = "mail**********.com"
objMsg.Subject = "Reporte " & Now()
objMsg.Sender = "Reportes"
Set objMsg.Configuration = msgConf
' Send
objMsg.Send
' Clear
Set objMsg = nothing
Set msgConf = nothing
end if
end sub
As a first step have a look on this posting: http://community.qlik.com/message/408695#408695. How do you could plot a table into the body I don't know - maybe a CopyTableToClipboard and pasting within the body worked or the table could be put in a variable which you add to the body-statement or you creates in the body a new table with the values from the qv-table.
You should also consider that you could export this table as file and use this as attachment. As alternatively you could use cdo.message instead of outlook - for this you will be find more examples within this forum: http://community.qlik.com/message/408695#408695
- Marcus
i need to send a mail using Outlook
As per client requirement i need to send the table in the mail body.
Also i tried to do it manuyally , if you go into properties ->Copy to Clipboard->select full table
and paste it in mail body , the table is inserted .
but i need to this via a macro
I think you won't get here a final solutions - you will need some own efforts. If you combined the approaches from the above links you could build your solution.
- Marcus
Do you know can i export multiples objects to html?
The issue:
http://community.qlik.com/thread/154094
Thank you Marcus_Sommer!!!
It's now nearby to your goal - Exportar varias tablas a un archivo html - and definitely a workaround and an adaption to outlook shouldn't be too difficult.
- Marcus