DDE : FileOpenEx

The specified PDF document is opened, and the screen is displayed. Two or more PDF files have already displayed to open in the front row in case of being.
This DDE message is not added to the list to be able to manipulate the PDF document by using the DDE message. In that case, please use DocOpen.
The difference with the FileOpen method is not waited for until the PDF document finishes opening. The following instruction is immediately executed.

Syntax

[FileOpenEx(char* fullPath)]

Argument

fullPath
[char*]
The full path of PDF file

Returns

true The PDF document is opened successfully
false Otherwise.

Notes: The return value cannot be acquired with DDE of VBA of Excel.

Sample: VBA of Excel

The PDF document is opened.

  • Please confirm the test by the step execution with F8 key.

Sub DDE_FileOpenEx()
    Dim lChanNo As Long      ‘DDE channel number
   
    ‘The Acrobat application is Started.
    Shell “C:\Program Files\Adobe\Acrobat 8.0\Acrobat\Acrobat.exe”
    ‘Shell “C:\Program Files\Adobe\Reader 9.0\Reader\AcroRd32.exe”
    ‘Open of DDE channel
    lChanNo = DDEInitiate(“Acroview”, “Control”)
   
    ‘E:\Test01.pdf file is opened and displayed.
    DDEExecute lChanNo, “[FileOpenEx(E:\Test01.pdf)]”
    ‘E:\Test02.pdf file is opened and displayed.
    DDEExecute lChanNo, “[FileOpenEx(E:\Test02.pdf)]”
    ‘The E:\Test01.pdf file is displayed in the front of screen.
    DDEExecute lChanNo, “[FileOpenEx(E:\Test01.pdf)]”
    ‘The E:\Test02.pdf file is displayed in the front of screen.
    DDEExecute lChanNo, “[FileOpenEx(E:\Test02.pdf)]”

‘All PDF is shut, and the Acrobat applicaton is ended.
    ‘The Acrobat process also disappears.

    DDEExecute lChanNo, “[AppExit()]” 
    ‘The DDE channel is shut.
    DDETerminate lChanNo
End Sub

Remarks

  • The FileOpen method doesn’t return the control until the PDF document finishes opening. The FileOpenEx method executes the following instruction without waiting for the PDF document to finish opening.
  • When two or more PDF documents have already been displayed, and the PDF document of this method specification is included in addition in that, it displays it in the front of screen.

Environment to confirm the operation

  • WindowsXP + SP3 + フルWindowsUpdate
    Adobe Acrobat Pro 8.1.4 + Office Pro 2003
    Adobe Acrobat Reader 9.1.0 + Office Pro 2003