Tag Archives: DDE

DDE Message List of Acrobat and Adobe Reader

1. How to use of this site This site explains the list of the DDE message (method) to operate Acrobat or Adobe Reader with the program sample. The sample uses comprehensible Microsoft VBA. It is thought that it becomes reference to VB, VB.NET, and JavaScript. When a pertinent instruction (method) is clicked from the list of each DDE message, the details are displayed. This site information is made based on information on Acrobat SDK. However, there is place where an interpretation different from SDK by the result of the test of the site manager actually is done a lot, too. In addition, the result might be different according to the … Continue reading DDE Message List of Acrobat and Adobe Reader

DDE : ShowToolbar

The toolbar of the Acrobat application is displayed.Only Acrobat can be used. It is not possible to use it with Acrobat Reader. Syntax [ShowToolbar()] Returns true The toolbar is shown successfully. false Otherwise. Notes: The return value cannot be acquired with DDE of VBA of Excel. Sample: VBA of Excel The toolbar of the Acrobat application is displayed. Please confirm the test by the step execution with F8 key. Sub DDE_ShowToolbar()  Dim lChanNo As Long ‘DDE channel number  ‘A double quotation mark is added for blank starting full path.  Const CON_PDF_PATH = “””E:\Test01.pdf””” ‘The Acrobat application is Started.  Shell “C:\Program Files\Adobe\Acrobat 7.0\Acrobat\Acrobat.exe”  ‘Open of DDE channel  lChanNo = DDEInitiate(“Acroview”, “Control”) … Continue reading DDE : ShowToolbar

DDE : MenuitemExecute

The menu entry where the Acrobat application was specified is executed.Only Acrobat can be used. It is not possible to use it with Acrobat Reader. Syntax [MenuitemExecute(char* menuItemName)] Returns It is not. Argument menuItemName[char*] Menu entry that exists in ‘Acrobat Toolbar and Toolbar Button Names list‘. Sample: VBA of Excel The toolbar of the Acrobat application is hidden. Acrobat Toolbar and Toolbar Button Names list Please confirm the test by the step execution with F8 key. Sub DDE_MenuitemExecute()    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:\Test01.pdf”””        ‘The Acrobat application … Continue reading DDE : MenuitemExecute

DDE : HideToolbar

The toolbar of the Acrobat application is hidden.Only Acrobat can be used. It is not possible to use it with Acrobat Reader. Syntax [HideToolbar()] Returns true The toolbar is hidden successfully. false Otherwise. Notes: The return value cannot be acquired with DDE of VBA of Excel. Sample: VBA of Excel The toolbar of the Acrobat application is hidden. Please confirm the test by the step execution with F8 key. Sub DDE_HideToolbar()    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 = “””C:\PDF\iac_developer_guide.pdf”””        ‘The Acrobat application is Started.    Shell “C:\Program Files\Adobe\Acrobat 9.0\Acrobat\Acrobat.exe”    ‘Open … Continue reading DDE : HideToolbar

DDE : FilePrint

An open display, and it does, and the print dialog box of PDF file is displayed. The following instruction is not executed as long as the print dialog box is not shut. Syntax [FilePrint(char* fullPath)] Argument fullPath[char*] The full path of the PDF file to be printed. Returns true The print succeeded. (Operation is unconfirmed.) false The document specified by fullPath is not opened. The print failed. 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_FilePrint()    Dim lChanNo As Long      ‘DDE channel number    ‘A double … Continue reading DDE : FilePrint

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 … Continue reading DDE : FileOpenEx

DDE : FileOpen

The specified PDF document is opened, and 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. Syntax [FileOpen(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_FileOpen()    Dim … Continue reading DDE : FileOpen

DDE : DocSetViewMode

Only the bookmark, the thumbnail image, and the document change the view mode to the display.It doesn’t operate in Acrobat Reader. Syntax [DocSetViewMode(char* fullPath, char* viewType)] Argument fullPath[char*] The full path of the PDF file. It is necessary already to be opened by the Acrobat application. viewType[char*] The following character strings are specified with the view mode.    PDUseThumbs – ‘Page’ Display    PDUseNone – ‘Only document’ Display    PDUseBookmarks – ‘It does and descend’ The display. Returns true The view mode is set successfully false Otherwise. Notes: The return value cannot be acquired with DDE of VBA of Excel. Sample: VBA of Excel The view mode of Acrobat PDF is changed to … Continue reading DDE : DocSetViewMode

DDE : DocSaveAs

Specified PDF file is preserved by the alias naming the name. Preservation to PDF file on the same name comes. When preserving it, the optimization of PDF file (reduction of the size) is done.It doesn’t operate in Acrobat Reader. Syntax [DocSaveAs(char* fullPath, char* newPath)] Argument fullPath[char*] The full path in updated PDF file. It is necessary already to be opened by the Acrobat application. newPath[char*] The Full path in the new PDF file. Returns true The pages are saved successfully. false Otherwise. Notes: The return value cannot be acquired with DDE of VBA of Excel. Sample: VBA of Excel Specified PDF file is preserved and the name is preserved by … Continue reading DDE : DocSaveAs

DDE : DocSave

Specified PDF file is preserved. If PDF file has been changed, it is preserved in the state.It doesn’t operate in Acrobat Reader. Syntax [DocSave(char* fullPath)] Argument fullPath[char*] Full path in updated PDF file. It is necessary already to be opened by the Acrobat application. Returns true The pages are saved successfully. false Otherwise. Notes: The return value cannot be acquired with DDE of VBA of Excel. Sample: VBA of Excel   Specified PDF file is saved. Please confirm the test by the step execution with F8 key. Sub DDE_DocSave()    Dim lChanNo As Long     ‘DDE channel number    ‘A double quotation mark is added for blank starting full path.    Const CON_PDF_PATH = “””E:\Test01.pdf”””     … Continue reading DDE : DocSave

DDE : DocReplacePages

The page is replaced by using the page for which it is specified from source PDF document with specification PDF document.It doesn’t operate in Acrobat Reader. Syntax [DocReplacePages(char* fullPath,        long startDestPage,        char* sourcePath,        long startSourcePage,        long endSourcePage)] Argument fullPath[char*] Full path in updated PDF file. It is necessary already to be opened by the Acrobat application. startDestPage[long] Beginning page of replacement of PDF file specified by the first argument. sourcePath[char*] Full path file name of source PDF file. This file doesn’t have the necessity that has been opened. startSourcePage[long] Replacement beginning page number of source PDF file origin. endSourcePage[long] Replacement end page number of source PDF file origin. Returns true … Continue reading DDE : DocReplacePages

DDE : DocPrint

It prints without doing the print range page in PDF file, presenting, and displaying the print dialog box. When printing, the size is changed to install on the printing area and it is printed.It doesn’t operate in Acrobat Reader. Syntax [DocPrint(char* fullPath, long startPage, long endPage)] Argument fullPath[char*] The full path of PDF file startPage[long] Print beginning page number.The beginning page : from 0. endPage[long] Print end page number.The end page : from 0. Returns true The print succeeded. false The document specified by fullPath is not opened.The print failed. Notes: The return value cannot be acquired with DDE of VBA of Excel. Sample: VBA of Excel The PDF document … Continue reading DDE : DocPrint

DDE : DocOpen

Acrobat (Or, Acrobat Reader) is returned to former size, and PDF file is displayed at the same time. It is possible to use it by both Acrobat and Acrobat Reader. Syntax [DocOpen(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_DocOpen() Dim lChanNo     As Long     ‘DDE channel number     Dim strFilePath As String   ‘The full path of PDF file     ‘A double quotation mark is added … Continue reading DDE : DocOpen

DDE : DocInsertPages

Another PDF document is inserted after the page for which the PDF document is specified. It doesn’t operate in Acrobat Reader. Syntax [DocInsertPages(char* fullPath, long insertAfterPage, char* sourcePath)] Argument   fullPath [char*] The full path of updated PDF document. insertAfterPage [long] It is page number of insertion (insertion) beginning PDF file specified by the first argument. Page 1 is assumed to be 0. It begins from 0. sourcePath [char*] It is a full path name of the insertion origin. This PDF file need not been opened. Returns true The pages are inserted successfully. false Otherwise. Notes: The return value cannot be acquired with DDE of VBA of Excel.   Sample: … Continue reading DDE : DocInsertPages

DDE : DocDeletePages

The page specified with the PDF document is deleted. The demand of deleting all pages with the document is disregarded because there should be at least page 1 in the PDF document.It doesn’t operate in Acrobat Reader. Syntax [DocDeletePages(char* fullPath, long fromPage, long toPage)] Argument fullPath[char*] The full path of PDF document fromPage[long] The page number of the first page to be deleted.It begins from 0. toPage[long] The page number of the last page to be deleted.It begins from 0. Returns true The pages are deleted successfully. false Otherwise. Notes: The return value cannot be acquired with DDE of VBA of Excel. Sample: VBA of Excel The PDF document from … Continue reading DDE : DocDeletePages

DDE : DocClose

The specified PDF document is shut. However, even if the PDF document has been changed, preservation is not done.Only Acrobat can be used. It is not possible to use it with Acrobat Reader. Syntax [DocClose(char* fullPath)] Argument fullPath[char*] The full path of PDF file Returns true The PDF document is closed successfully false Otherwise. Notes: The return value cannot be acquired with DDE of VBA of Excel. Sample: VBA of Excel The specified PDF document is shut. Please confirm the test by the step execution with F8 key. Sub DDE_DocClose()    Dim lChanNo     As Long ‘DDE channel number    Dim strFilePath As String ‘The full path of PDF file    ‘A double quotation mark is added … Continue reading DDE : DocClose

DDE : CloseAllDocs

All open PDF documents are shut.It is possible to use it by both Acrobat and Acrobat Reader. Syntax [CloseAllDocs()] Returns true The all documents are closed successfully. false Otherwise. Notes: The return value cannot be acquired with DDE of VBA of Excel. Sample: VBA of Excel All open PDF documents are shut. Please confirm the test by the step execution with F8 key. Sub DDE_CloseAllDocs()    Dim lChanNo     As Long ‘DDE channel number    Dim strFilePath As String ‘The full path of PDF file ‘    Shell “C:\Program Files\Adobe\Acrobat 9.0\Acrobat\Acrobat.exe”    Shell “C:\Program Files\Adobe\Reader 9.0\Reader\AcroRd32.exe”    ‘A double quotation mark is added for blank starting full path.    strFilePath = “””E:\iac_developer_guide.pdf”””    ‘Open of DDE channel    lChanNo = DDEInitiate(“Acroview”, … Continue reading DDE : CloseAllDocs

DDE : AppShow

The Acrobat application is returned from minimization to former size and the screen is displayed.Only Acrobat can be used. It is not possible to use it with Acrobat Reader. Syntax [AppShow()] Returns true The Acrobat application is shown successfully. false Otherwise. Notes: The return value cannot be acquired with DDE of VBA of Excel. Sample: VBA of Excel The Acrobat application is returned from minimization to former size and the screen is displayed. Please confirm the test by the step execution with F8 key. Sub DDE_AppShow()    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 … Continue reading DDE : AppShow

DDE : AppHide

The Acrobat application is minimized. However, it is not displayed in the taskbar. It only remains as a process in the memory. It is possible to use it at any time.Only Acrobat can be used. It is not possible to use it with Acrobat Reader. Syntax [AppHide()] Returns true: the Acrobat application is hidden successfully. false: otherwise. Notes: The return value cannot be acquired with DDE of VBA of Excel. Sample: VBA of Excel The Acrobat application is minimized. Please confirm the test by the step execution with F8 key. Sub DDE_AppHide()    Dim lChanNo     As Long     ‘DDE channel number    Dim strFilePath As String    ‘The full path of PDF file        ‘The Acrobat … Continue reading DDE : AppHide

DDE : AppExit

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. Syntax [AppExit()] Returns true Application is exitted successfully. false Otherwise. Notes: The return value cannot be acquired with DDE of VBA of Excel.   Sample: VBA of Excel   When the PDF document is displayed, Acrobat (Or, Acrobat Reader) application is ended.   Please confirm the test by the step execution with F8 key.  Sub DDE_AppExit()    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”””    … Continue reading DDE : AppExit