Greetings,
With the help of users here on this forum, I have been able to use VBA to open an embedded file. Here is the code I am using for the macro ...
I have several embedded PDF files and I use the same code for each, changing only the PDF file name.
When I initiate the macro, the PDF file opens as expected. If I immediately close the file and try to open that same or initiate one of the other macros, there is no response. I must wait a few seconds before I can initiate that macro again.
Does anyone know what this delay is?
Regards,
Steve
With the help of users here on this forum, I have been able to use VBA to open an embedded file. Here is the code I am using for the macro ...
VBA Code:
Sub getstarted()
' If any error resume next. Need this in case user does not have the 32Bit or 64Bit version of Adobe Reader
On Error Resume Next
Sheet5.OLEObjects("getting_started").Verb Verb:=xlVerbOpen
Sheet16.Select
' Use AppActivate to bring Acrobat Reader to the front, make sure to trap the error if user does not specific version of reader
AppActivate "Adobe Acrobat Reader DC (64-bit)", True
AppActivate "Adobe Acrobat Reader DC (32-bit)", True
On Error GoTo 0
End Sub
I have several embedded PDF files and I use the same code for each, changing only the PDF file name.
When I initiate the macro, the PDF file opens as expected. If I immediately close the file and try to open that same or initiate one of the other macros, there is no response. I must wait a few seconds before I can initiate that macro again.
Does anyone know what this delay is?
Regards,
Steve