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.
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”””
Shell “C:\Program Files\Adobe\Acrobat 9.0\Acrobat\Acrobat.exe”
‘Open of DDE channel
lChanNo = DDEInitiate(“Acroview”, “Control”)
‘Open of PDF file
DDEExecute lChanNo, “[DocOpen(“ & CON_PDF_PATH & “)]”
‘Deletion of page (deletion of 2, 3, and page 4)
DDEExecute lChanNo, “[DocDeletePages(“ & CON_PDF_PATH & “,1,3)]”
‘Saving of PDF file. Note) Optimization is not done.
DDEExecute lChanNo, “[DocSave(” & CON_PDF_PATH & “)]”
‘The Acrobat applicaton is ended..
‘If this is not done, the Acrobat process remains.
DDEExecute lChanNo, “[AppHide()]”
‘The DDE channel is shut.
DDETerminate lChanNo
End Sub
Execution result
It is a result of the comparison on page thumbnail screen of Acrobat.
Deletion of page (deletion of 2, 3, and page 4).
Before |
After |
![]() |
![]() |
Remarks
- It doesn’t operate in Acrobat Reader.
- It is optimized and preservation is not done.
Environment to confirm the operation
- WindowsXP + SP3 + WindowsUpdate
- Adobe Acrobat Pro 7.0.8 + Office Pro 2003
- Adobe Acrobat Pro 8.1.4 + Office Pro 2003
- Adobe Acrobat Pro 9.1.0 + Office Pro 2003