Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do you show a PDF at a certain page in a form? 1

Status
Not open for further replies.

BotCow

Programmer
Jul 10, 2003
58
US
Is there an ActiveX controller that will load and put Adobe Acrobat onto a form? And will it be able to display a specifc page I want? For example:

I have a search form that searches for different subjects on pages. When that subject pops up, it gives me a list of pages within a query. Say the first page it finds with the subject "Homer Simpson" appears is Page 8, is there anyway I can open up the PDF and jump to Page 8 right away?
 
As long as your search returns the pdf name and location and the page no. the following should work ok using Adobe Acrobat Reader:

Dim strPDFFile As String, intPage As Integer
strPDFFile = "c:\my documents\YourPDFFileName.PDF"
intPage = 8
SendKeys "%(DP)" & intPage & "{Tab}{Enter}"
Application.FollowHyperlink strPDFFile, , True

If you have the full version of Adobe Acrobat you may have to play around with the SendKeys Statement.

Bill
 
An alternative is to use bookmarks in Adobe. This way, you can be more specific in the location you drop the user. (You just gave me a great idea on help pages -- thanks)

Richard
 
Hehe your welcome, I always have these "great ideas" and they're way beyond me. Like the fusion reactor? That was my idea but I didn't have the materials. :p
 
Hi BotCow,

Keep the questions coming, I like your questions because they're always tricky and need thinking about.

Thanks for the star, much appreciated.

Bill
 
Hehe I would give you 10 stars if I could, you and a handful of people are always the ones to give me the right solution. So here's another question:

Okay keeping in mind that I don't do, and haven't formally learned VBA (I do other languages like C/C++/Java) what may be inherently obvious to you guys might not be to me.

I now have question of integration. I have that great piece of code but I'm unsure of how to implement it. Well, here's a background of what I'm doing:

I scanned a dozen notebooks into their own PDF. Since they're handwritten and cannot be OCRed I need to tediously enter in each page's number, the subject, the people involved, and the companies involved. This is so that when a user wants to search the book, they can easily find topics on what they want other than flipping through a ton of notebooks. Since there was no viable solution on Acrobat, I decided to database the notebooks and program a search engine for it (thanks to the great Custom Search thread here). So now what? When the user searches, it returns a query with all the matching search results. Should I add another field to the table with generated hyperlinks maybe? Or maybe let it display a subform with the queries and give the user a button to "Open PDF" upon a selection of one of the records?
 
Hi,

Have you a site that you can upload all these files to.

Otherwise zip everything into one file and send to billpower@cwcom.net I'll have a look at it over the weekend and post any suggestions here on Monday.

Bill
 
Sure, thanks, I'll email it to ya.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top