Results 1 to 2 of 2

Thread: PDDoc.SetInfo "Keywords", sFoundKeys not working

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Apr 2021
    Posts
    71

    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

  2. #2

    Thread Starter
    Lively Member
    Join Date
    Apr 2021
    Posts
    71

    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.

Tags for this Thread

Posting Permissions

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



Click Here to Expand Forum to Full Width