Excel VBA Subroutine, Fix my Code: print screen clipboard paste to microsoft paint

已关闭 已发布的 7 年前 货到付款
已关闭 货到付款

**I need this following code to work correctly. It currently fails.

It should be able to:

1. capture a screen shot,

2. open microsoft paint,

3. paste image of screen shot to microsoft paint,

4. save file as GIF FORMAT

Use VBA found in Excel

** Option Explicit

Private Declare Sub keybd_event Lib "user32" (ByVal bVk As Byte, ByVal _

bScan As Byte, ByVal dwFlags As Long, ByVal dwExtraInfo As Long)

Private Const KEYEVENTF_KEYUP = &H2

Private Const VK_SNAPSHOT = &H2C

Private Const VK_MENU = &H12

Private Const VK_TAB = &H9

Private Const VK_V = &H56

Private Const VK_LCONTROL = &HA2

Sub AltPrintScreen()

Dim myappid

'go back to software AIMS screen (see attached file [login to view URL])

keybd_event VK_MENU, 0, 0, 0

keybd_event VK_TAB, 0, 0, 0

keybd_event VK_TAB, 0, KEYEVENTF_KEYUP, 0

keybd_event VK_MENU, 0, KEYEVENTF_KEYUP, 0

'take snap shoot of the screen and put into clipboard

keybd_event VK_MENU, 0, 0, 0

keybd_event VK_SNAPSHOT, 0, 0, 0

keybd_event VK_SNAPSHOT, 0, KEYEVENTF_KEYUP, 0

keybd_event VK_MENU, 0, KEYEVENTF_KEYUP, 0

'OPEN MS PAINT

myappid = Shell("[login to view URL]", 1)

AppActivate myappid

SendKeys "%FS{ENTER}"

DoEvents

'paste image into MSPaint

keybd_event VK_LCONTROL, 0, 0, 0

keybd_event VK_V, 0, 0, 0

keybd_event VK_LCONTROL, 0, KEYEVENTF_KEYUP, 0

keybd_event VK_V, 0, KEYEVENTF_KEYUP, 0

'SAVE MSPAINT FILE AS GIF

SendKeys "%FS{ENTER}"

End Sub

The description for this is not what i wanted. I made a new project.

工程 MySQL PHP 软件构架 软件测试

项目ID: #12709195

关于项目

7个方案 远程项目 活跃的7 年前

有7名威客正在参与此工作的竞标,均价$29/小时

schoudhary1553

Greetings sir, i am an expert freelancer for this job and your 100% satisfaction is assured if you allow me to serve. Here is the reason. Why you should pick me? a) I am a very expert and have the same kind of ex 更多

$34 USD 在0天内
(194条评论)
7.6
Beannsofts

It's my duty to deliver credible work to my clients. Check my previous work in Wordpress and the responses speak for themselves. I am ready to work for you. Thank you alot.

$16 USD 在6天内
(69条评论)
6.5
catstevens2009

Hi there! Have done this type of work before and am an excel expert! Please feel free to message me with any additional information or with questions if any! Thanks! -Steve

$35 USD 在0天内
(37条评论)
5.5
anithasrikanth2

I am expert in vba

$15USD 在1天里
(3条评论)
1.8