Results 1 to 8 of 8
  1. #1
    2 Star Lounger
    Join Date
    Feb 2015
    Posts
    128
    Thanks
    19
    Thanked 1 Time in 1 Post

    Post Need VBA code to open PDF file and strike one word

    Hi Experts,
    I am bit unsure if this is possible or not? I have list of PDF files saved in a folder. Is it possible with VBA code to open each file and search for a word and strike it?
    Regards,
    JD

  2. #2
    WS Lounge VIP
    Join Date
    Dec 2009
    Location
    Earth
    Posts
    8,179
    Thanks
    47
    Thanked 983 Times in 913 Posts
    Do you want to modify the PDF file or collect some details from the PDF and add it to a spreadsheet? Either way I expect you will need to use Word to open the PDF.

    cheers, Paul

  3. #3
    2 Star Lounger
    Join Date
    Feb 2015
    Posts
    128
    Thanks
    19
    Thanked 1 Time in 1 Post
    Hi Paul,

    I need to modify the PDF file. In short it should work in a way where each PDF should open and specific word gets strike. I find one link - http://www.vbaexpress.com/forum/show...ABOUT-PDF-FILE. This is somewhat closed to my requirement. I am not able to run it, because I am not sure which reference I have to select from the tool option.

    Regards,
    JD

  4. #4
    Silver Lounger
    Join Date
    Mar 2014
    Location
    Forever West
    Posts
    2,072
    Thanks
    0
    Thanked 259 Times in 248 Posts
    Just a note about .pdf files, many times they will be protected from being edited by others than the creator/author. That was one of the features when Adobe Acrobat was created for the purpose of sharing documents. There's a number of such features available in Acrobat such as allowing or disallowing printing or other things, can allow only reading.

  5. #5
    WS Lounge VIP
    Join Date
    Dec 2009
    Location
    Earth
    Posts
    8,179
    Thanks
    47
    Thanked 983 Times in 913 Posts
    I don't have Office to test, so you'll have to wait for someone else to advise.

    cheers, Paul

  6. #6
    Super Moderator
    Join Date
    May 2002
    Location
    Canberra, Australian Capital Territory, Australia
    Posts
    5,054
    Thanks
    2
    Thanked 417 Times in 346 Posts
    Quote Originally Posted by Jaggi View Post
    I need to modify the PDF file. In short it should work in a way where each PDF should open and specific word gets strike. I find one link - http://www.vbaexpress.com/forum/show...ABOUT-PDF-FILE. This is somewhat closed to my requirement. I am not able to run it, because I am not sure which reference I have to select from the tool option.
    As indicated in the link, you need to add a reference to the Acrobat Library, which you do via Tools|References in the VBE of whichever application you want to use. You can only do that if you have Adobe Acrobat Pro installed.

    Adobe Acrobat Pro 8 is available as a free download (see: http://www.techspot.com/downloads/46...at-8-free.html - note the serial# mentioned there). Updates, to bring it up to 8.3.1 are available from: ftp://ftp.adobe.com/pub/adobe/acrobat/win/8.x/

    Note 1: If you install the updates, you need to install them in order (8.1.0>8.1.1, etc.) and, although three of them will prompt to reboot, you don't need to do so until all of the updates are installed. Your AV software may also mis-identify a print spooler in the last few updates as potential viruses - just tell it to accept them as legit.

    Note 2: If you want to use Adobe Acrobat Pro 8 as a Print Driver, you'll need to go to Start>Devices and Printers>Adobe PDF>Right-Click>Printer Properties>Advanced, then click the 'Print Directly to Printer' radio button.
    Last edited by macropod; 2016-01-25 at 05:36.
    Cheers,

    Paul Edstein
    [MS MVP - Word]

  7. #7
    2 Star Lounger
    Join Date
    Feb 2015
    Posts
    128
    Thanks
    19
    Thanked 1 Time in 1 Post
    Hi Macro,

    Thanks for providing the above information on the Adobe. I checked the version which is installed in my PC and it is Adobe Reader XI. I think it is a basic one and not the pro one. Please let me if it is useful to run the macro via excel. I have selected following references from the tool|Reference option.
    • Acrobat Access 3.0 type library
    • Adobe Acrobat 10.0 type library
    • Adobe acrobat Browser control type library 1.0
    • Adobe Reader File Preview Type Library
    Regards,
    JD

  8. #8
    Super Moderator
    Join Date
    May 2002
    Location
    Canberra, Australian Capital Territory, Australia
    Posts
    5,054
    Thanks
    2
    Thanked 417 Times in 346 Posts
    The Reader versions are not sufficient - you need a Pro version - and the Library's name is just 'Acrobat'.
    Cheers,

    Paul Edstein
    [MS MVP - Word]

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
  •