I written a Sub/Script for Outlook to print 2 copies of an attached PDF. I now need to get Outlook VBA to send keys (Select all, Copy and Close..."^A", "^C", "^W") to the already open PDF in AcrobatReader.
I have tried all the standard methods and none have worked. See below:
Version 1:
Dim xAcrobat As Variant
xAcrobat = Shell("C:\Program Files\Adobe\Acrobat DC\Acrobat\Acrobat.exe", vbNormalFocus)
AppActivate xAcrobat
Application.wait (Now() + TimeValue("00:00:01"))
Application.SendKeys "{^A}", True
Application.SendKeys "{^C}", True
Application.SendKeys "{^W}", True
Version 2:
Shell "C:\Program Files\Adobe\Acrobat DC\Acrobat\Acrobat.exe", vbNormalFocus
SendKeys "^A", True
SendKeys "^C", True
SendKeys "^W", True
Outlook does not seem to send the keystrokes to acrobat.
The end goal is to have the copied text from the PDF be run in an excel workbook I created to use that text to create and print "audit sheets" we use for our manufacturing process.
Any help would be appreciated.
I have tried all the standard methods and none have worked. See below:
Version 1:
Dim xAcrobat As Variant
xAcrobat = Shell("C:\Program Files\Adobe\Acrobat DC\Acrobat\Acrobat.exe", vbNormalFocus)
AppActivate xAcrobat
Application.wait (Now() + TimeValue("00:00:01"))
Application.SendKeys "{^A}", True
Application.SendKeys "{^C}", True
Application.SendKeys "{^W}", True
Version 2:
Shell "C:\Program Files\Adobe\Acrobat DC\Acrobat\Acrobat.exe", vbNormalFocus
SendKeys "^A", True
SendKeys "^C", True
SendKeys "^W", True
Outlook does not seem to send the keystrokes to acrobat.
The end goal is to have the copied text from the PDF be run in an excel workbook I created to use that text to create and print "audit sheets" we use for our manufacturing process.
Any help would be appreciated.