PDDoc.SetInfo "Keywords", sFoundKeys not working
All,
I am using VBA to search in pdf files for certain words. When found I want to save them in the pdf-document keywords. I have referenced Adobe Acrobat 10 Type Library.
The code I use runs without errors but the keywords are not being saved in the properties of the document.
If sFoundKeys <> "" Then
Dim x As Boolean
sFoundKeys = Right(sFoundKeys, Len(sFoundKeys) - 1)
PDDoc.SetInfo "Keywords", sFoundKeys
x = PDDoc.Save(PDSaveFull, PDFPath)
If x <> True Then
MsgBox "Unable to save " & PDFPath
End If
End If
Re: PDDoc.SetInfo "Keywords", sFoundKeys not working
Turned out the code was working after all.
I just didn't see the keywords in the pdf preferences, because I wasn't using Acrobat Reader.
When you right click the document and goto Preferences - Details you won't see the keywords.