Results 1 to 6 of 6

Thread: Macro to automatically convert prt scr image-based text to real text in cell

  1. #1

    Macro to automatically convert prt scr image-based text to real text in cell



    Register for a FREE account, and/
    or Log in to avoid these ads!

    I need help programming my Excel VBA Macro to do OCR (text recognition) from a prt scr screen capture image and input the text into cells. Currently my Excel file has a push-button, and upon clicking on it the macro pastes into Excel the current clipboard image I have created by pressing prt scr while in another program. The macro then crops the image to the region with the applicable text. I have to then manually type the text I see in image format into the appropriate cells.

    Can someone help me with the VBA coding to automate this? Id like it to use the clipboard image and run it through OneNote OCR, after which the applicable text values are automatically entered into the cells. Ideally the code will first crop to the region with the desired text before it does OCR. If this is not feasible, it will need to incorporate a method (keyword search?) to hone in on the desired text after the entire prt scr image has been OCRed.

    Thank you.

  2. #2
    Acolyte patel's Avatar
    Join Date
    Feb 2014
    Location
    Italy
    Posts
    59
    Articles
    0
    You can not automate this process with vba

  3. #3
    Super Moderator p45cal's Avatar
    Join Date
    Dec 2012
    Posts
    1,356
    Articles
    0
    Excel Version
    365
    I suspect that you just might be able to do this. Even if you don't have a version of Office which includes OneNote, MS have just made it available for free:
    http://www.pcworld.com/article/21083...ing-tools.html
    http://www.zdnet.com/microsoft-deliv...ws-7000027378/

    I've never used OneNote before and I discovered that it was already installed on my desktop.
    I'll have an explore when I get the time, in the meantime:
    http://msdn.microsoft.com/en-us/libr...ffice.14).aspx

    Could you perhaps post some of your existing Excel code that manipulates the clipboard image - just to get me started?

  4. #4
    Awesome. I want to use OneNote because it is now the MS standard for OCR, but I'm open to using MODI instead if necessary. My code basically pastes into Excel the clipboard image of the prt scr I made from an active window of a different program. Then it crops the pasted image down to the region with the numbers I need. Then I manually type these numbers into cells. I'd like to have the code run the prt scr image through OCR and somehow isolate these numbers, then have them be pasted directly into the cells. CODE:


    Sub View1Paste()
    '
    ' View1Paste Macro
    ' Macro recorded 6/8/2011 by xxx.
    ''
    Range("B3").Select
    ActiveSheet.Paste
    Selection.ShapeRange.PictureFormat.CropLeft = 542.93
    Selection.ShapeRange.PictureFormat.CropRight = 33#
    Selection.ShapeRange.PictureFormat.CropBottom = 38.25
    Selection.ShapeRange.PictureFormat.CropTop = 520.43
    Selection.ShapeRange.IncrementLeft -549.75
    Selection.ShapeRange.IncrementTop -108
    Range("F33").Select
    End Sub



    Quote Originally Posted by p45cal View Post
    I suspect that you just might be able to do this. Even if you don't have a version of Office which includes OneNote, MS have just made it available for free:

    I've never used OneNote before and I discovered that it was already installed on my desktop.
    I'll have an explore when I get the time, in the meantime:

    Could you perhaps post some of your existing Excel code that manipulates the clipboard image - just to get me started?

  5. #5
    Super Moderator p45cal's Avatar
    Join Date
    Dec 2012
    Posts
    1,356
    Articles
    0
    Excel Version
    365
    I'm still researching this one when I get the time - but I'm not getting a lot of that time! Anyway, could you fill me in on your setup; versions of windows, Excel, is MODI available on your system (it ccould be the path of least resistance)? Is it for use by you only on your machine or are you looking at setting the functionality up on other people's machines etc. etc.
    And another thing, you mention the active window of another programme; is this screen really only an image? What is the programme/application? There may be more robust ways to achieve the same end.

  6. #6
    Super Moderator p45cal's Avatar
    Join Date
    Dec 2012
    Posts
    1,356
    Articles
    0
    Excel Version
    365
    Lost interest?

    Quote Originally Posted by p45cal View Post
    Anyway, could you fill me in on your setup; versions of windows, Excel, is MODI available on your system (it ccould be the path of least resistance)? Is it for use by you only on your machine or are you looking at setting the functionality up on other people's machines etc. etc.
    And another thing, you mention the active window of another programme; is this screen really only an image? What is the programme/application? There may be more robust ways to achieve the same end.

Posting Permissions

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