All open PDF files are shut. Afterwards, Acrobat (Or, Acrobat Reader) application is ended.
It is possible to use it by both Acrobat and Acrobat Reader.
|true||Application is exitted successfully.|
Sample: VBA of Excel
- Please confirm the test by the step execution with F8 key.
Dim lChanNo As Long ‘DDE channel number
Dim strFilePath As String ‘The full path of PDF file
‘A double quotation mark is added for blank starting full path
strFilePath = “””E:\iac_developer_guide.pdf”””
‘The Acrobat Reader application is start
Shell “C:\Program Files\Adobe\Reader 9.0\Reader\AcroRd32.exe”
‘Open of DDE channel
lChanNo = DDEInitiate(“Acroview”, “Control”)
DDEExecute lChanNo, “[DocOpen(“ & strFilePath & “)]”
‘All PDF is shut, and the Acrobat application is end
DDEExecute lChanNo, “[AppExit()]”
‘The DDE channel is shut
- The process of Acrobat doesn’t remain. It disappears from the memory.
- If this method is not executed at the end, the process of Acrobat of the memory remains.
- When ending, all opened PDF documents are shut.
Environment to confirm the operation
- WindowsXP + SP3 + WindowsUpdate
- Acrobat Reader 8.1 + Office Pro 2003
- Acrobat Reader 9.1.0 + Office Pro 2003