|
参考サイト
ht tp://pdf-file.nnn2.com/
★の部分を修正してみました
Sub test2()
Dim ret As Boolean
Dim filePath As String
filePath = "C:\Users\hage\Desktop\test.pdf"
Dim acroApp As Object
Dim pdDoc As Object
' Dim avDoc As Object '★
Set acroApp = CreateObject("AcroExch.APP")
Set pdDoc = CreateObject("AcroExch.PDDoc")
' Set avDoc = CreateObject("AcroExch.AVDoc") '★
ret = pdDoc.Open(filePath) '★
Dim strTitle As String
strTitle = pdDoc.GetInfo("Title")
MsgBox (strTitle)
pdDoc.Close '★
acroApp.Exit
' Set avDoc = Nothing '★
Set pdDoc = Nothing
Set acroApp = Nothing
End Sub
|
|