Home |
Search |
Today's Posts |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
opening the PDF can be done using by using follow hyperlink
it avoids the need for version & path specifications. Sub AcroURLCopyPaste() Dim sUrl$ ActiveSheet.Cells.ClearContents ActiveSheet.Cells(1).Select sUrl = "file:///" & c:\pier.pdf" ActiveWorkbook.FollowHyperlink (sUrl) Application.Wait Now + TimeSerial(0, 0, 2) SendKeys "^a", True SendKeys "^c", True SendKeys "%{f4}" ActiveSheet.Paste End Sub keepITcool < email : keepitcool chello nl (with @ and .) < homepage: http://members.chello.nl/keepitcool "Ian Elliott" wrote: Hmm-I got it to work actually, with this code: 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 Application.SendKeys "^c", True Dim wordapp As New Word.Application With wordapp .Visible = True .Documents.Add DocumentType:=wdNewBlankDocument .Selection.PasteAndFormat (wdPasteDefault) End With End Sub "^A" doesn't work, but "^a" does. Sorry for all the fuss. Thanks. |
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 |