Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thanks in advance.
I am writing a macro that starts Reader (from Excel), and trying to get it to select the entire file. I am using sendKeys, but with no luck. The code works, but sendKeys doesn't select all. AppActivate does flash the Reader button on the buttom of the screen for a second, so I believe it successfully activates it. I am not sure what I am doing wrong, but if anybody could help me I would appreciate it-my code is: Sub test() x = Shell("C:\Program Files\Adobe\Acrobat 5.0 \Reader\AcroRd32.exe", vbNormalNoFocus) channel = DDEInitiate("acroview", "control") DDEExecute channel, "[DocOpen(""c:\pier.pdf"")]" AppActivate (x) Application.SendKeys "^a", True 'CTRL-A should select all End Sub I have tried with application.sendkeys "^A", using false or true, neither with any luck, and the way I am executing this is from the VB editor, hitting the run sub/user form button on the tool bar (eventually this macro will be executed by a button on the worksheet). I think my problem is somewhere to do with the queing for sendkeys. If anyone has any ideas, would appreciate it. Thanks again. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Opening Acrobat Reader using VBA | Excel Discussion (Misc queries) | |||
how to re install Adobe Acrobat in Excel? The adobe Acrobat work. | Excel Discussion (Misc queries) | |||
Sendkeys | Excel Programming | |||
SendKeys | Excel Programming | |||
sendkeys | Excel Programming |