• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Opening PDF in Acrobat READER DC via VBA in Excel

New Here ,
Feb 23, 2020 Feb 23, 2020

Copy link to clipboard

Copied

I have a list of PDF files in MS Excel.  I want to open & then close the files in Acrobat Reader.
I do Not want to edit the files, only Open & Close.
I have the VBA Reference: "Adobe Reader File Preview Type Library" selected.
I should be able to use Early Binding.

 

Could someone fill in the missing code so I can use Acrobat Reader.

Thank you in advance.  I've spent hours trying to figure this out!

 

 

Sub TestFilesPDF()Dim sFile As String
Dim sFile as string
'Early Binding
Dim PDFApp As Acrobat.CAcroApp   'Acrobat Reader HELP
Dim PDFDoc As Acrobat.CAcroAVDoc 'Acrobat Reader HELP

'Note: 
'dllFile = "C:\Program Files (x86)\Adobe\Acrobat Reader DC\Reader\AcroRd32.dll"
'exeFile = "C:\Program Files (x86)\Adobe\Acrobat Reader DC\Reader\AcroRd32.exe"
    
    
    'Uses Early Binding to open Acrobat Reader
    Set PDFApp = "" '<< Help
    Set PDFDoc = "" '<< Help

    With wsFileList
		sFile = .Cells(2, 3).Value
		
        'Open File
        PDFDoc.Open sFile, vbNormalFocus
        
        'Close File
        PDFDoc.Close
        
    End With 'wsFileList
    
    'Release memory
    AcroApp.Exit
    Set AcroDoc = Nothing
    Set AcroApp = Nothing 
End Sub

 

 

Views

29.1K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Feb 23, 2020 Feb 23, 2020

Copy link to clipboard

Copied

I would be happy to use a Late Binding solution!

I do not want to use FollowHyperlink

 

Thank you,
John

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Feb 24, 2020 Feb 24, 2020

Copy link to clipboard

Copied

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Feb 25, 2020 Feb 25, 2020

Copy link to clipboard

Copied

The IAC does not work with Reader

Thom Parker - Software Developer at PDFScripting
Use the Acrobat JavaScript Reference early and often

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Sep 14, 2021 Sep 14, 2021

Copy link to clipboard

Copied

LATEST

Could you please give an Excel VBA example of the best way to output a PDF file and then open it in Acrobat Reader DC?

 

Thanks!

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines