+ Reply to Thread
Results 1 to 2 of 2

Macro to capture screenshots and paste into single Word whenever I press hotkey

Hybrid View

hiruthere Macro to capture screenshots... 03-17-2014, 11:54 AM
hiruthere Re: Macro to capture... 03-18-2014, 02:32 PM
  1. #1
    Registered User
    Join Date
    03-04-2009
    Location
    Mumbai,india
    MS-Off Ver
    Excel 2003
    Posts
    3

    Macro to capture screenshots and paste into single Word whenever I press hotkey

    I want to create macro which capture screenshots and paste to word document automatically so that it save the time during manual testing. Please help me to create macro as below

    1. Open application or website to take screenshot
    2. Press 'HotKey'
    3. It will take screen shot and paste to word document
    4. navigate to other screen of application
    5. Press 'HotKey' again
    6. It will take screen shot and paste to same word document
    7. Once finished press new 'HotKey' to save the word document to some path.
    Last edited by hiruthere; 03-17-2014 at 11:57 AM.

  2. #2
    Registered User
    Join Date
    03-04-2009
    Location
    Mumbai,india
    MS-Off Ver
    Excel 2003
    Posts
    3

    Re: Macro to capture screenshots and paste into single Word whenever I press hotkey

    I have written following code which takes screen shot on new word document. Also I don't know how assign hotkey to take screen shot and save document. Please help me in solving this.....

    ===============================================================================================


    Private Declare Sub keybd_event Lib "user32" (ByVal bVk As Byte, ByVal bScan As Byte, ByVal dwFlags As Long, ByVal dwExtraInfo As Long)

    Private Declare Sub Sleep Lib "kernel32.dll" (ByVal dwMilliseconds As Long)

    Private Const VK_SNAPSHOT As Byte = 44

    Private Const VK_LCONTROL As Long = &HA2
    Private Const VK_V = &H56
    Private Const KEYEVENTF_KEYUP = &H2

    Sub Sample()

    Sleep 3000
    DoEvents

    '~~> Take a snapshot
    Call keybd_event(VK_SNAPSHOT, 0, 0, 0)

    '~~> Start Word


    Set wordobj = CreateObject("Word.Application")

    Set objDoc = wordobj.Documents.Add

    wordobj.Visible = True

    Set objSelection = wordobj.Selection

    'Paste into Word
    objSelection.Paste

    End Sub

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 1
    Last Post: 08-23-2013, 05:45 PM
  2. shortcut/ hotkey Paste Special Transpose
    By chuckdee in forum Excel General
    Replies: 7
    Last Post: 01-07-2013, 07:59 PM
  3. Word to excel - paste multiple rows into single columns
    By rxsuresh in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-31-2011, 05:57 PM
  4. Select destination and press Enter or choose Paste
    By cdmg in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-30-2010, 03:25 PM
  5. Formula to capture a single character within a cell
    By oparman in forum Excel General
    Replies: 3
    Last Post: 10-31-2009, 03:28 AM

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