I have a bunch of pdf's that im needing to find text, delete the row, and have the row move up in a pdf file. I can use javascript to do this but I do not know how to even begin. I found this script online, it works, but it is not javascript so it will not work in pdf. Any help would be greatly appreciated!

Sub DeleteRowWithSpecifiedText()
    Dim sText As String

    sText = InputBox("Enter text for Row to be deleted")
    With Selection.Find
        .Text = sText
        .Wrap = wdFindContinue
    End With
    Do While Selection.Find.Execute
        If Selection.Information(wdWithInTable) Then
        End If
End Sub
0 Comments   [ + ] Show Comments


Please log in to comment

Community Chosen Answer


Here's an extract from a PDF I picked at random and loaded into a text editor:


Best of luck searching for text in that...

Answered 06/23/2016 by: VBScab
Red Belt

Please log in to comment


first of, as VBScab already stated, the PDF "file" is not like a normal text file, or even a word document (doc or docx) therefore you'll need a component (that supports ActiveX if you plan on using VBS) to open the PDF (as a PDF) and then "program" your search and replace...
This is not trivial, and judging by the format of your question I think this task is above your abilities (this is not meant as an insult, just as an observation).
I suggest that you get in touch with the Devs at your company and let them have a look at your problem.


Answered 06/23/2016 by: Pressanykey
Red Belt

Please log in to comment
Answer this question or Comment on this question for clarity