0 Replies Latest reply: Nov 2, 2012 4:13 PM by Sravs P RSS

    Entire sheet as an image and email in Outlook


      I have a macro exporting the entire sheet into JPG image and embed the image in the outlook message box.(not an attachment)

      The macro works well only for the current screen of the sheet but not the pagedown/pageup objects.That is, only the objects that are seen on the screen are captured as image,but not the other objects (when we scroll the sheet the objects above/below the screen are not getting copied in the image.

      The macro I have is


           SUB openMail


           'Export entire Sheet
           Set Sheet = ActiveDocument.ActiveSheet
           Sheet.ExportBitmapToFile "D:\\TestAttachImage.jpg"
           'MsgBox "Test Image Exported"

           Set vOutlook = CreateObject("Outlook.Application")
           Set vMessage = vOutlook.CreateItem(olMailItem)


           vMessage.To = " "
           vMessage.Subject = "QlikView Sheet Testing"


           vMessage.HTMLBODY = "<HTML><BODY><img align=baseline border=0 hspace=100 src=""D:\\TestAttachImage.jpg""</BODY></HTML>"

           'MsgBox "Image embedded"

            END SUB


      Is there any way I can copy entire sheet objects in a single JPG image file?(the objects down the scroll bar(pagedown))