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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
frinfo
Partner - Contributor II
Partner - Contributor II

send email using macro with AccessPoint

Hi,

i've create a button with an action to call a macro that make some filter and after send an email.

Here's the code:

sub Export

     ActiveDocument.Fields("Descrizione Raggruppamento 3 Clienti").Select  "User1"

     Set sel_val = ActiveDocument.Fields("Descrizione Raggruppamento 3 Clienti").GetSelectedValues

     Path = "C:\" & sel_val.Item(0).Text & ".xls"

   

     set obj = ActiveDocument.GetSheetObject("CH362")

     obj.ExportBiff Path

   

     call SendGMail(Path,"user1@mail.com")

end sub

Sub SendGMail(nomeFile,mail)

      

filepath=nomeFile

email = mail

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

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

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

msgConf.Fields.Update

'End With

objMsg.To = email ' type to mail id

objMsg.From = "test@mail.com" 'type from mail id

objMsg.Subject = "Customer Service Report"

objMsg.HTMLBody = "check the attachment"

objMsg.AddAttachment   filepath    ' Attachement object

objMsg.Sender = "Test Service"

Set objMsg.Configuration = msgConf

' Send

objMsg.Send

Msgbox("Email Sent Successfully")

' Clear

Set objMsg = nothing

Set msgConf = nothing

end sub

From qv.exe works but from browser don't work.

How can i solve?

Thanks

0 Replies