×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

Sendkeys and Word 2010

Sendkeys and Word 2010

Sendkeys and Word 2010

(OP)
Does anyone have issues with Sendkeys in Microsoft Word 2010?
Since install the macro shows an error on line 82 which is
Sendkeys "^V"
which should paste what was copied in Extra to Word but
no longer works.

RE: Sendkeys and Word 2010

hi,

and your code using sendkeys?

Skip,

glassesJust traded in my old subtlety...
for a NUANCE!tongue

RE: Sendkeys and Word 2010

(OP)
Sendkeys "^V" is Alt V which is paste and worked fine from Extra before Windows 7 and Office 2010 was installed.

' This section of code contains the script needed to copy & paste an area on the screen

Dim Sys As Object, Sess As Object, MyScreen As Object, MyArea As Object

Set Sys = CreateObject("EXTRA.System")
Set Sess = Sys.ActiveSession
Set MyScreen = Sess.Screen
Set MyArea = MyScreen.Area(9, 15, 9, 48)
MyArea.Select
Sess0.Screen.Copy

Set MyArea = MyScreen.Area(14, 20, 15, 48)
MyArea.Select
Sess0.Screen.CopyAppend

Set MyArea = MyScreen.Area(15, 55, 15, 56)
MyArea.Select
Sess0.Screen.CopyAppend

Set MyArea = MyScreen.Area(15, 63, 15, 72)
MyArea.Select
Sess0.Screen.CopyAppend

g_HostSettleTime = 400 ' milliseconds

AppActivate "5162Labels.docm - Microsoft Word"
Sess0.Screen.WaitHostQuiet(g_HostSettleTime)
Sendkeys "^v"

Sess0.Screen.WaitHostQuiet(g_HostSettleTime)
Sendkeys "{Down}"
Sess0.Screen.WaitHostQuiet(g_HostSettleTime)

g_HostSettleTime = 200 ' milliseconds

System.TimeoutValue = OldSystemTimeout
End Sub

RE: Sendkeys and Word 2010

Hi,

Think about it!

Your program WAITS a fixed period of time for your asynchronous emulator to return control! Kinda like waiting at a stoplight just 5 seconds and then gunning it thru the intersection regardless if the light has changed or not!

Rather wait for the emulator to return control and then proceed

CODE

Sendkeys("<^v>")
Do until Sess0.screen.waitforcursor(r, c)
  Doevents
Loop 
Where r, c is the rest coordinates for the screen.

Skip,

glassesJust traded in my old subtlety...
for a NUANCE!tongue

RE: Sendkeys and Word 2010

(OP)
Thanks Skip I'll try that soon as I get a chance

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close