+ Reply to Thread
Results 1 to 16 of 16

Sending screenshot via outlook using excel code

  1. #1
    Forum Contributor
    Join Date
    11-09-2007
    Location
    USA
    MS-Off Ver
    2003
    Posts
    141

    Sending screenshot via outlook using excel code

    I am in need of some way to capture a screen shot of a program on screen and send it to a specified email address at a certain time of the day. I would not think its impossible, could it be done using vba code?

  2. #2
    Forum Expert
    Join Date
    12-23-2006
    Location
    germany
    MS-Off Ver
    XL2003 / 2007 / 2010
    Posts
    6,326
    I am in need of some way to capture a screen shot of a program on screen
    Is it an xl screenshot?

  3. #3
    Forum Contributor
    Join Date
    11-09-2007
    Location
    USA
    MS-Off Ver
    2003
    Posts
    141
    It would be of another program open on the desktop. I am also thinking it may be easier to have it save the screenshot to a folder instead of emailing it.

  4. #4
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258
    Hello ge0rge,

    It is doable. I will be out of my office for a while, but will dig the code up when I get back.

    Sincerely,
    Leith Ross

  5. #5
    Forum Contributor
    Join Date
    11-09-2007
    Location
    USA
    MS-Off Ver
    2003
    Posts
    141
    That would be great. In the meantime I am going to give it a go.

  6. #6
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258
    Hello ge0rge,

    Capturing the screen is the easy part. I am having problems with embedding a picture in Outlook. Not sure if is my email setup or a problem with Outlook. I'll keep you updated.

    Macro Code to Capture the Screen
    Please Login or Register  to view this content.
    Sincerely,
    Leith Ross

  7. #7
    Forum Contributor
    Join Date
    11-09-2007
    Location
    USA
    MS-Off Ver
    2003
    Posts
    141
    I have decided to save it to a folder instead if it helps...

  8. #8
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258
    Hello ge0rge,

    I may have wasted a lot of your time today. Did you want this picture emabeded in the body of the email or sent as an attachment?

    Sincerely,
    Leith Ross

  9. #9
    Forum Contributor
    Join Date
    11-09-2007
    Location
    USA
    MS-Off Ver
    2003
    Posts
    141
    You did not waste my time. I generally come here for help after I already spent 1-2 hrs looking for answers throughout the day. The projects I work on never were officially given to me as objectives, but to help our department I am always trying to develop faster, more fool proof ways of doing things. I slowly turned into the guy everyone asks for excel help. The good news is that most don't know what vba code is, so no questions there.

    Either way would work just fine. Thanks for helping!

  10. #10
    Forum Contributor
    Join Date
    11-09-2007
    Location
    USA
    MS-Off Ver
    2003
    Posts
    141
    Perhaps there should be an abandoned tag as well as the solved one.

  11. #11
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258
    Hello ge0rge,

    Your post isn't abandoned, I am just a little behind. I have been busy this last week and now I'm catching up with posts. Since you have moved the file to a separate folder, the easiest approach would be to send the file as an attachment using Outlook. This macro will prompt you for the file using a file dialog box. The recipient, subject and message are taken from the active worksheet cells A1, B1, and C1 respectively. You can change this to match the cells you are using. They are marked in red.
    Please Login or Register  to view this content.
    Adding the Macro
    1. Copy the macro above pressing the keys CTRL+C
    2. Open your workbook
    3. Press the keys ALT+F11 to open the Visual Basic Editor
    4. Press the keys ALT+I to activate the Insert menu
    5. Press M to insert a Standard Module
    6. Paste the code by pressing the keys CTRL+V
    7. Make any custom changes to the macro if needed at this time.
    8. Save the Macro by pressing the keys CTRL+S
    9. Press the keys ALT+Q to exit the Editor, and return to Excel.

    To Run the Macro...
    To run the macro from Excel, open the workbook, and press ALT+F8 to display the Run Macro Dialog. Double Click the macro's name to Run it.

    Sincerely,
    Leith Ross

  12. #12
    Registered User
    Join Date
    12-03-2010
    Location
    Amsterdam
    MS-Off Ver
    Excel 2003
    Posts
    5

    Re: Sending screenshot via outlook using excel code

    (deleted)...
    Last edited by skultety; 12-06-2010 at 10:32 AM.

  13. #13
    Registered User
    Join Date
    12-03-2010
    Location
    Amsterdam
    MS-Off Ver
    Excel 2003
    Posts
    5

    Talking Sending screenshot via outlook using excel code

    (deleted)...

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

    Re: Sending screenshot via outlook using excel code

    Hello Leith,

    I found you here too May you remember my problem from another forum. 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 (click first then second), they do 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 ). How can I combine them together or run them properly with just 1 click?

    1.Code: "Screencapture"
    Please Login or Register  to view this content.
    2.Code: "emailimage" to paste clipboard into email body
    Please Login or Register  to view this content.
    3. Runboth:
    Please Login or Register  to view this content.
    Last edited by huseyinkasirga; 02-06-2012 at 06:19 PM.

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

    Re: Sending screenshot via outlook using excel code

    Dear All,

    Can anybody help me about the problem mentioned above?

    Thanks in advance.

  16. #16
    Forum Expert Domski's Avatar
    Join Date
    12-14-2009
    Location
    A galaxy far, far away
    MS-Off Ver
    Darth Office 2010
    Posts
    3,950

    Re: Sending screenshot via outlook using excel code

    Please take a moment to read the forum rules.

    2. Don't post a question in the thread of another member -- start your own. If you feel it's particularly relevant, provide a link to the other thread.
    Dom
    "May the fleas of a thousand camels infest the crotch of the person who screws up your day and may their arms be too short to scratch..."

    Use code tags when posting your VBA code: [code] Your code here [/code]

    Remember, saying thanks only takes a second or two. Click the little star to give some Rep if you think an answer deserves it.

+ 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