Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
tom tom is offline
external usenet poster
 
Posts: 570
Default search within PDF...

Using VBA, I made it possible to open certain PDF files that are related to
the cell. Problem is, It opens several PDF files. Is there a way to open just
the one that contains a certain string? I haven't been able to figure out how
to perform a search within a pdf. Any help would be greatful.
Thank you in advanced,
tom
  #2   Report Post  
Posted to microsoft.public.excel.programming
tom tom is offline
external usenet poster
 
Posts: 570
Default search within PDF...

I meant a certain string within the PDF files.
Thank you


"tom" wrote:

Using VBA, I made it possible to open certain PDF files that are related to
the cell. Problem is, It opens several PDF files. Is there a way to open just
the one that contains a certain string? I haven't been able to figure out how
to perform a search within a pdf. Any help would be greatful.
Thank you in advanced,
tom

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 45
Default search within PDF...

First, It depends on how the PDF was created. If it was created from an
electronic source (e.g., a Word file), the text is searchable; if it was
scanned to PDF, what you're actually seeing is a "picture" of the text in the
PDF and, thus, you can't search that.

Secondly, if you have Adobe Acrobat (creator) installed, you can hook into
Acrobat's javascript object model with VBA. You'll need to set a reference
to the Acrobat 6.0 (or what-have-you) Type Library. For example:

Dim gAPP As Acrobat.CAcroApp 'PDF app
Dim gPDDoc As Acrobat.CAcroPDDoc 'Default document in PDF
Dim jso As Object 'javascript object
Dim bkmkRoot As Object 'PDF doc root bookmark

Set gAPP = CreateObject("AcroExch.App") 'Get Acrobat application
Set gPDDoc = CreateObject("AcroExch.PDDoc") 'Get document
Set jso = gPDDoc.GetJSObject
Set bkmkRoot = jso.bookmarkRoot

(Note: Everything following the "jso." should be javascript, using
javascript conventions.)

You can download the Acrobat javascript object model reference from Adobe.
(I can't recall the website where I picked up how to link VBA and javascript.)


"tom" wrote:

I meant a certain string within the PDF files.
Thank you


"tom" wrote:

Using VBA, I made it possible to open certain PDF files that are related to
the cell. Problem is, It opens several PDF files. Is there a way to open just
the one that contains a certain string? I haven't been able to figure out how
to perform a search within a pdf. Any help would be greatful.
Thank you in advanced,
tom

  #4   Report Post  
Posted to microsoft.public.excel.programming
tom tom is offline
external usenet poster
 
Posts: 570
Default search within PDF...

everything is done in javascript in Acrobat? I know how to script in
Javascript some what. I'll go on ahead and look into that. I found an article
on Acrobat's web-site explaining how to link Javascript and VB. I figure the
steps to link VB and the steps to link VBA are the same. Thanks for the step
in the right direction, Eric.
tom

"Eric White" wrote:

First, It depends on how the PDF was created. If it was created from an
electronic source (e.g., a Word file), the text is searchable; if it was
scanned to PDF, what you're actually seeing is a "picture" of the text in the
PDF and, thus, you can't search that.

Secondly, if you have Adobe Acrobat (creator) installed, you can hook into
Acrobat's javascript object model with VBA. You'll need to set a reference
to the Acrobat 6.0 (or what-have-you) Type Library. For example:

Dim gAPP As Acrobat.CAcroApp 'PDF app
Dim gPDDoc As Acrobat.CAcroPDDoc 'Default document in PDF
Dim jso As Object 'javascript object
Dim bkmkRoot As Object 'PDF doc root bookmark

Set gAPP = CreateObject("AcroExch.App") 'Get Acrobat application
Set gPDDoc = CreateObject("AcroExch.PDDoc") 'Get document
Set jso = gPDDoc.GetJSObject
Set bkmkRoot = jso.bookmarkRoot

(Note: Everything following the "jso." should be javascript, using
javascript conventions.)

You can download the Acrobat javascript object model reference from Adobe.
(I can't recall the website where I picked up how to link VBA and javascript.)


"tom" wrote:

I meant a certain string within the PDF files.
Thank you


"tom" wrote:

Using VBA, I made it possible to open certain PDF files that are related to
the cell. Problem is, It opens several PDF files. Is there a way to open just
the one that contains a certain string? I haven't been able to figure out how
to perform a search within a pdf. Any help would be greatful.
Thank you in advanced,
tom

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
file search or search files Richad Excel Discussion (Misc queries) 0 October 22nd 09 07:56 PM
Functions (search within search result) reply to this please Nick Excel Worksheet Functions 1 February 17th 09 03:57 AM
How do I search excel spreadsheets using multiple search criteria. Kasper Excel Worksheet Functions 4 December 15th 05 12:26 AM
I cant do a search on this forum. Everytime I search, it comes up with zero results viswanthank Excel Programming 3 June 10th 05 09:15 AM
Create a search Field within a worksheet to search command buttons Ed P[_2_] Excel Programming 1 December 14th 04 08:04 PM


All times are GMT +1. The time now is 09:37 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"