AcroExch.App(.Open) do not work on Win8 & Win10
AcroExch.App do not work on Win8 & Win10
Please solve... Why? What's the problem...?
My error code is a part of VB Automatic PDF print code, I'm working on Excel VB macro
The code is General example on the web.
This code works very well on win7.
But do not work on win8 & win10
Already Checked "Adobe acrobat 10.0 Type Library"
But cannot work AVDoc.Open filename, ""
At the line AVDoc.Open filename, ""
Acrobat.exe is running (Can see with Task manager)
But works or shows nothing...
When Close Acrobat.exe by "Task manager", VB shows '-2147023170 (800706be) runtime error'.
<Versions for Ref.>
OS = win10 (using BitLocker)
Acrobat = Acrobat XI standard
MS Office = Excel2016 (with Micosoft Visual Basic for Application 7.1)
<My code is ...>
Sub file2PDF()
Dim Shift_row, Shift_Col As Integer
Dim i, RR, CC, aaa As Integer
Dim filename As String
Dim AcroApp As Acrobat.AcroApp
Dim AVDoc As Acrobat.AcroAVDoc
Dim PDDoc As Acrobat.AcroPDDoc
Dim IsSuccess As Boolean
Set AcroApp = CreateObject("AcroExch.App")
Set AVDoc = CreateObject("AcroExch.AVDoc")
filename = "C:\xxx\aaa.xlsx" '<=== No problem until here
AVDoc.Open filename, "" '<===Always Stop at this line
Set AVDoc = AcroApp.GetActiveDoc
If AVDoc.IsValid Then
Set PDDoc = AVDoc.GetPDDoc
' Fill in pdf properties.
PDDoc.SetInfo "Title", "My Title"
PDDoc.SetInfo "Author", "The Author"
PDDoc.SetInfo "Subject", "The Subject"
PDDoc.SetInfo "Keywords", "Keywords"
aaa = 2
If PDDoc.Save(aaa, F_loc) <> True Then
MsgBox "Failed to save " & filename
End If
PDDoc.Close
End If
AVDoc.Close True
AcroApp.Exit
'Cleanup
Set PDDoc = Nothing
Set AVDoc = Nothing
Set AcroApp = Nothing
End Sub
