Qlikview Export Screenshot To Email -
i'm trying write script button in app named export. main idea button take screenshot of current active sheet, , attach email in outlook. here it's supposed do:
- open outlook (done)
- attach image in email (done)
however, script works on local machine. not work once deploy onto qlikview server. suspect is because save local c drive. how work once deploy on server?
here's code:
sub sendmail() set appoutlook = createobject("outlook.application") 'create new message set message = appoutlook.createitem(olmailitem) message .subject = "testing daily report" .htmlbody = "<span lang=en>" _ & "<p class=style2><span lang=en><font face=calibri size=3>" _ & "hello,<br ><br >the weekly dashboard available. " _ & "<br>the main overview attached below:<br>" 'first create image jpg file activedocument.activesheet.exportbitmaptofile "c:\snapshot.png" 'we attached embedded image position @ 0 (makes attachment hidden) tempfilepath = "c:\" .attachments.add tempfilepath & "snapshot.png", olbyvalue, 0 'then add html <img src=''> link image 'note can customize width , height - not mandatory .htmlbody = .htmlbody & "<br>" & "<img src='cid:snapshot.png'" & "width='1200' height='600'><br>" .to = " " .display end end sub
Comments
Post a Comment