Jump to content


Register a free account to unlock additional features at BleepingComputer.com
Welcome to BleepingComputer, a free community where people like yourself come together to discuss and learn how to use their computers. Using the site is easy and fun. As a guest, you can browse and view the various discussions in the forums, but can not create a new topic or reply to an existing one unless you are logged in. Other benefits of registering an account are subscribing to topics and forums, creating a blog, and having no ads shown anywhere on the site.

Click here to Register a free account now! or read our Welcome Guide to learn how to use this site.



  • Please log in to reply
1 reply to this topic

#1 lilywhite


  • Members
  • 1 posts
  • Local time:11:16 AM

Posted 11 August 2005 - 05:02 PM

I am using sendkeys in a VB6 program to communicate with a variety of programs such as Word, Outlook express, etc. One command in particular cannot be counted on to be consistent and that is the SelectAll function: Sendkeys "^a".
Is there an alternate or more reliable way of accomplishing this function?
(I have looked at Win API but the only function I can find is
SendMessage hWnd, WM_COPY, 0, ByVal 0&. There are WM_COPY values for Cut, Copy, and Paste, but I can't find one for Select All.)

BC AdBot (Login to Remove)


#2 Jay Cat

Jay Cat

  • Members
  • 7 posts
  • Local time:11:16 AM

Posted 12 August 2005 - 06:32 PM

Hi lilywhite-

If you give me a little more information about how you are communicating with other applications I'll try to help.

The following works for MS Word:

Include a reference to the Microsoft Word Object Library

Dim objWord As New Word.Application
Dim doc As Word.Document

objWord.Visible = True
Set doc = objWord.Documents.Open("C:\Docs\Work\Patent992.doc")

However, it sounds like you're using a different method so just give me a little more information.

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users