+ Reply to Thread
Results 1 to 11 of 11

Send Screen Capture via Outlook

  1. #1
    Registered User
    Join Date
    02-05-2012
    Location
    İstanbul
    MS-Off Ver
    Microsoft Office 2003
    Posts
    10

    Exclamation Send Screen Capture via Outlook

    Dear All

    I aim to take a screenshot of an active Excel window (it is a userform) and send it in the body of a Outlook E-Mail as image with clicking on a commandbutton on userform. I found some codes; however I think I have mistake combining two codes together. Here are two codes I am working on. First one is "ScreenCapture" to copy the active window into clipboard and second one is "emailimage" to paste clipboard to outlook mail. If I run them seperately with two buttons (see attachment: click first ScreenCapture and then emailimage), they do exactly what I want. However I cannot combine them to run just with 1 click (I have used "Call" code, but ScreenCapture is not seems to work properly, it takes capture of outlook mail: see attachment and click RunBoth button). How can I combine them together or run them properly with just 1 click on userform?

    Kitap1.xlsm

    Thanks in advance

    CODE-1: ScreenCapture (to take screenshot of active window)
    Please Login or Register  to view this content.
    CODE-2: emailimage (to paste clipboard to a new mail and send/display it)
    Please Login or Register  to view this content.
    CODE-3: Runboth (to run two different macro with 1 click)
    Please Login or Register  to view this content.
    Last edited by huseyinkasirga; 02-10-2012 at 07:14 AM. Reason: Attached File

  2. #2
    Registered User
    Join Date
    02-05-2012
    Location
    İstanbul
    MS-Off Ver
    Microsoft Office 2003
    Posts
    10

    Re: Send Screen Capture of Active Window via Outlook to a predefined E-Mail Adress

    Hello All,

    Does anyone have any idea for solution?

    Thanks for your support.

  3. #3
    Registered User
    Join Date
    02-05-2012
    Location
    İstanbul
    MS-Off Ver
    Microsoft Office 2003
    Posts
    10

    Re: VBA: Send Screen Capture of Active Window via Outlook to a predefined E-Mail Adre

    I also have attached a simple sample file to make clear what i am telling.

  4. #4
    Registered User
    Join Date
    02-05-2012
    Location
    İstanbul
    MS-Off Ver
    Microsoft Office 2003
    Posts
    10

    Re: VBA: Send Screen Capture of Active Window via Outlook to a predefined E-Mail Adre

    Dear All,

    Has nobody any idea about the solution?

  5. #5
    Registered User
    Join Date
    02-05-2012
    Location
    İstanbul
    MS-Off Ver
    Microsoft Office 2003
    Posts
    10

    Re: VBA: Send Screen Capture of Active Window via Outlook to a predefined E-Mail Adre

    Dear All,

    Has nobody any idea about the solution?

  6. #6
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Send Screen Capture via Outlook

    Hi huseyinkasirga
    Let me look at this for a bit. I've successfully done this
    take a screenshot of an active Excel window (it is a userform)
    and I've successfully been able to embed an image into the Outlook Email body. Let me see what I can do. I'll get back to you.
    John

    If you have issues with Code I've provided, I appreciate your feedback.

    In the event Code provided resolves your issue, please mark your Thread as SOLVED.

    If you're satisfied by any members response to your issue please use the star icon at the lower left of their post.

  7. #7
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Send Screen Capture via Outlook

    Hi huseyinkasirga
    What versions of Excel, Outlook and Word are you running? Your profile indicates 2003 but you attached an .xlsm file.

  8. #8
    Registered User
    Join Date
    02-05-2012
    Location
    İstanbul
    MS-Off Ver
    Microsoft Office 2003
    Posts
    10

    Re: Send Screen Capture via Outlook

    Hello jaslake,

    Thank you very much for your attention and support. I am working with 2003 version Office. The file that I have uploaded was prepared in Office 2010, because I have prepared and uploaded that example from another computer. However I am working with 2003 to create a userform and also the users are using 2003.

    Thanks in advance
    Last edited by huseyinkasirga; 02-09-2012 at 03:42 PM.

  9. #9
    Registered User
    Join Date
    02-05-2012
    Location
    İstanbul
    MS-Off Ver
    Microsoft Office 2003
    Posts
    10

    Re: Send Screen Capture via Outlook

    Just now I have updated the attachment with 2003 version and created a simple userform to make us able to try codes. It seems that problem is maybe paste code, because ScreenCapture code copies the image to clipboard, emailimage code is starting outlook with a new mail, but the image is not pasted
    Attached Files Attached Files
    Last edited by huseyinkasirga; 02-09-2012 at 03:45 PM.
    Best Regards,

    Kasirga

  10. #10
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Send Screen Capture via Outlook

    Hi Kasirga

    My research has indicated one cannot do a copy/paste into the Outlook Email Body. The code in the attached overcomes that and is attributed to Leith Ross and Ivan F Moala (http://www.xcelfiles.com/EmailImg.html). I've merely adapted it to my needs and to the requests of OP's. There are other ways to do this but I've not been successful implementing these other ways in pre-2007 Excel/Outlook.

    Please note...you'll need to set these references in VBA (or whatever version you have available) References.jpg

    Play with it...let me know of issues.
    Attached Files Attached Files

  11. #11
    Registered User
    Join Date
    02-05-2012
    Location
    İstanbul
    MS-Off Ver
    Microsoft Office 2003
    Posts
    10

    Re: Send Screen Capture via Outlook

    Hello John,

    It really worked also for me. Thank you very much for your support

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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