+ Reply to Thread
Results 1 to 4 of 4

Acrobat Reader was replaced today by Acrobat Reader 2017

Hybrid View

  1. #1
    Registered User
    Join Date
    03-22-2018
    Location
    nederland
    MS-Off Ver
    2017
    Posts
    2

    Acrobat Reader was replaced today by Acrobat Reader 2017

    Hey,

    My Acrobat Reader was replaced today by Acrobat Reader 2017, now that I can no longer run my VBA script to help my iemad user?


    __________________________________________

    Option Explicit
    Option Compare Text
    
    'System-Konstanten für Acrobat Reader
    Private Const iHKCU = &H80000001
    Private Const iHKLM = &H80000002
    
    Private Const sRegKey = "Software\Adobe\Acrobat Reader\"
    Private Const sExeValue = "\Adobe\Reader %1\Reader\AcroRd32.Exe"
    
    Private Const sExeSql = "Select * from Win32_Process Where Name='AcroRd32.Exe'"
    Private Const sWinMan = "winmgmts:{impersonationLevel=impersonate}!\\.\root\cimv2"
    Private Const sWinReg = "winmgmts:{impersonationLevel=impersonate}!\\.\root\default:StdRegProv"
    
    'Diese Function ermittelt den Programm-Pfad vom AcrobatReader
    Public Function GetAcroReaderPath() As String
    Dim intHKey As Variant, aValues As Variant, sValue As String, strAcroPath As String
    
    With GetObject(sWinReg)
    For Each intHKey In Array(iHKCU, iHKLM)
    .EnumKey intHKey, sRegKey, aValues
    If IsArray(aValues) Then
    If IsNumeric(aValues(0)) Then sValue = aValues(0)
    End If
    Next
    End With
    
    If sValue <> "" Then
    strAcroPath = Environ("ProgramFiles") & Replace(sExeValue, "%1", sValue)
    
    With CreateObject("Scripting.FileSystemObject")
    If .FileExists(strAcroPath) = False Then strAcroPath = ""
    End With
    
    GetAcroReaderPath = strAcroPath
    End If
    End Function
    
    'Diese Function schließt den AcrobatReader
    Public Sub CloseAcroPdfFiles()
    Dim objProcess As Object
    
    For Each objProcess In GetObject(sWinMan).ExecQuery(sExeSql)
    objProcess.Terminate
    Next
    End Sub
    ______________-


    thank you for the help
    Last edited by FDibbins; 03-23-2018 at 01:15 AM.

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,946

    Re: Acrobat Reader was replaced today by Acrobat Reader 2017

    Your post does not comply with Rule 3 of our Forum RULES. Use code tags around code.

    Posting code between [CODE] [/CODE] tags makes your code much easier to read and copy for testing, it also maintains VBA formatting.

    Click on Edit to open your thread, then highlight your code and click the # icon at the top of your post window. More information about these and other tags can be found here
    (I have added them for you - this time )
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  3. #3
    Registered User
    Join Date
    03-22-2018
    Location
    nederland
    MS-Off Ver
    2017
    Posts
    2

    Re: Acrobat Reader was replaced today by Acrobat Reader 2017

    Ford,

    Thanks for you assistance. I have some question about your instructions. I am having trouble finding the EDIT button in order to change my code. If I understand correctly you have already changed the code for me , but for the future I will like to understand the process of changing codes. Is it possible to make a screenshot so that I can see it visually. Thanks again for you help.

    Daniel.

  4. #4
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,946

    Re: Acrobat Reader was replaced today by Acrobat Reader 2017

    When you copy/paste your code, to add code tags, you just need to highlight all that you want to include inside the tags, then click the # icon at the top of this window, in the 2nd row.

    If you need to edit to add, just do it the same way

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Open a PDF file through Acrobat Reader DC
    By sriley5 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-28-2017, 10:17 PM
  2. [SOLVED] VBA code to Close Adobe Acrobat reader
    By flupsie in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 08-26-2017, 12:38 PM
  3. Macro not working in with acrobat reader 9.0
    By mohan.r1980 in forum Excel Programming / VBA / Macros
    Replies: 14
    Last Post: 06-10-2017, 05:48 AM
  4. OLE method to save pdf to text using Acrobat Reader?
    By onidarbe in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-28-2009, 12:42 AM
  5. tools: Opening Acrobat Reader using VBA
    By vetron in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-27-2006, 10:10 AM
  6. Opening Acrobat Reader using VBA
    By Raam in forum Excel General
    Replies: 4
    Last Post: 11-14-2005, 05:35 PM
  7. Print Acrobat Reader PDF file from VBA
    By Matthias Claes in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-28-2005, 05:05 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1