Results 1 to 1 of 1

Screenshot problem:

Threaded View

  1. #1
    Registered User
    Join Date
    07-25-2013
    Location
    Bangalore
    MS-Off Ver
    Excel 2007
    Posts
    1

    Screenshot problem:

    Hello All,

    I am using the below macro to send a mail but this wont send a screenshot in excel sheet. I am pasting the screenshot in excel but the screenshot is not displaying in mail. Please help me out to send a picture which is pasted in excel sheet.
    Sub Mail_Workbook_1()
    Dim i As Integer
    i = 1
    ' This example sends the last saved version of the Activeworkbook object .
        Dim OutApp As Object
        Dim OutMail As Object
    
        Set OutApp = CreateObject("Outlook.Application")
        Set OutMail = OutApp.CreateItem(0)
    
        On Error Resume Next
       ' Change the mail address and subject in the macro before you run it.
        With OutMail
            .To = "sanathana.samartha@socgen.com"
            .CC = ""
            .BCC = ""
            .Subject = Cells(i, 3)
            .Body = Cells(i, 5)
            .Display = Cells(16, 8) ====>> This is for screenshot    
    
            'Application.SendKeys "(^v)"
    
    
            '.Attachments.Add Sheets(Screenshot).Activate
            '.Attachments.Sheets("Screenshot").Activate
            '.Attachments.Add ActiveWorkbook.FullName
            ' You can add other files by uncommenting the following line.
            '.Attachments.Add ("C:\test.txt")
            ' In place of the following statement, you can use ".Display" to
            ' display the mail.
            .Send
        End With
        On Error GoTo 0
    
        Set OutMail = Nothing
        Set OutApp = Nothing
    End Sub
    Last edited by vlady; 07-25-2013 at 08:53 PM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Screenshot of a worksheet , saved as .jpg
    By iscar_marius in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-10-2012, 05:27 AM
  2. Work out % from dataset? (Screenshot)
    By zudecke in forum Excel General
    Replies: 8
    Last Post: 06-22-2010, 05:49 PM
  3. What is the name of this feature? (see screenshot)
    By compulsiveguile in forum Excel General
    Replies: 3
    Last Post: 07-24-2008, 09:13 AM
  4. Create a Screenshot?
    By michaelas in forum Excel - New Users/Basics
    Replies: 4
    Last Post: 08-24-2006, 04:57 PM
  5. [SOLVED] ot check out a screenshot of excel 12
    By Gary Keramidas in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-13-2005, 11:05 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1