This is a long shot, probably, but is there a way to integrate an Acrobat document within a Visual Basic form? Similar to how you can embed it within a Web page.
![]() |
Patch reliability is unclear. Unless you have an immediate, pressing need to install a specific patch, don't do it. |
SIGN IN | Not a member? | REGISTER | PLUS MEMBERSHIP |
-
Embedding Acrobat in VB (VB6 & Acrobat 5.0 Writer)
Home » Forums » AskWoody support » Productivity software by function » Visual Basic for Applications » Embedding Acrobat in VB (VB6 & Acrobat 5.0 Writer)
- This topic has 39 replies, 6 voices, and was last updated 23 years, 3 months ago.
AuthorTopicWSMike Shea
AskWoody LoungerJanuary 28, 2002 at 9:29 pm #366090Viewing 1 reply threadAuthorReplies-
WScharlotte
AskWoody Lounger -
WSMike Shea
AskWoody Lounger
-
-
WSSammyB
AskWoody LoungerJanuary 29, 2002 at 1:31 pm #566871It works! I have AA Reader 4.0. In VB, with a T, I checked “Acrobat Control for ActiveX” and put the control on my form. It has a custom property with just the URL in it. I don’t have an Internet connection on my VB machine, so I just entered a local file name, including drive, path and name. When I pressed enter, it screamed “Internal Error!”, but it didn’t crash, so I pressed run and it displayed my document. Cool! Hopefully with 5.0 you’ll do even better. –Sam
-
WSMike Shea
AskWoody Lounger -
WSSammyB
AskWoody LoungerJanuary 30, 2002 at 3:21 pm #567168
> launch a separate Acrobat document or were you able to open it inside your form
Inside the form
> a control that allows you to display a web browser within your forms
Yes, use the application wizard and include web support
> Can display of Acrobat documents be done within this type of control?
Yes -
WSMike Shea
AskWoody Lounger
-
-
-
WSMike Shea
AskWoody LoungerJanuary 30, 2002 at 2:29 pm #567158And Sammy, depending on your answer to my last (since I would prever a non HTML object in my form as I don’t know how to program in HTML), there is a control that allows you to display a web browser within your forms. Can display of Acrobat documents be done within this type of control?
-
WSjscher2000
AskWoody Lounger -
WSrory
AskWoody Lounger
-
-
WSMike Shea
AskWoody LoungerFebruary 5, 2002 at 4:06 pm #568363Sam,
I’ve been trying to figure this out. I guess Jefferson tried this too and it sounds like it failed on him, though he was using it in a Word document.
Anyhow, I’ve loaded the SDK of Adobe from their full version 5 and Acrobat Control for ActiveX is not part of my choices for references. There are quite a few other references for Acrobat that display, but I’ve tried them all and none have a control that pops into the toolbox. I am assuming that there would have to be a control that I would paint onto the screen that would contain the Acrobat document for display.
-
WScharlotte
AskWoody Lounger -
WSMike Shea
AskWoody LoungerFebruary 8, 2002 at 4:07 pm #569130Hi Charlotte,
I hate asking you this again, and I really don’t want to put you in another position where I make you soak your head, but I found the PDF.OCX, added it to my references and it still did not give me a control to paint on the form to contain the PDF document. Am I approaching this right?
Mike
-
WSjscher2000
AskWoody Lounger -
WSMike Shea
AskWoody Lounger -
WSMike Shea
AskWoody LoungerFebruary 15, 2002 at 6:59 am #570538Okay, I’m starting to feel really lame. I put the SVG Viewer Control control on my form. This allowed me to place an actual control on the form which I figured would contain the Adobe document. It had an SRC property for which I put in the DOS path to my local PDF document. It did absolutely nothing, not even an error. I’m gathering that SRC (assuming I am dealing with the right control in the first place) is not all there is to it. . . The SDK documentation that came with Acrobat was weak – or perhaps I was, either way I couldn’t make use of it.
Charlotte, if you are still following this thread, the PDF.OCX control appears to be more of an icon displayed on the form that will launch Acrobat externally to display the PDF file. To open it in a frame (control) within the VB form, the viewer seemed to have potential.
-
WScharlotte
AskWoody LoungerFebruary 15, 2002 at 1:10 pm #570553My memory may be rusty
and I just discovered I never installed the reader on my current laptop, so I can’t check it out, but I have created Access forms in the past that would disply PDF files. I’ll have to rummage around on my old machine and see if I can find an example so I can recall what I did to make it work and which ocx I used.
-
WSMike Shea
AskWoody Lounger -
WSjscher2000
AskWoody LoungerFebruary 16, 2002 at 7:13 pm #570941Circling back, perhaps Reader 5.0 doesn’t come with the control I am using? I have a weird intermediate product called Acrobat Business Tools 4.0 (lets you save filled-in forms, import and export pages, and download web sites, but doesn’t include most authoring features of the full product or the print-to-PDF drivers). To avoid major confusion and potential loss of functionality, I have not installed any Acrobat 5.0 stuff on my computer.
-
WScharlotte
AskWoody LoungerFebruary 17, 2002 at 3:00 am #570955In Version 5 it shows up as the same. However, I haven’t figured out quite how to work with it. Its custom properties show the enlightening “” as the only custom property and if you click on it, it will simply shut down VB. In Access, if you try it, it will hang Access.
I suspect what Mike did was drop an OLE control on a form and use that to load the PDF.ocx. That will result in an icon displaying in the OLE control window, but that isn’t the way you would do it. The idea is to drop the PDF.ocx itself onto the form … I just haven’t figured out how to make this version work yet.
-
WScharlotte
AskWoody Lounger -
WSGary Frieder
AskWoody LoungerFebruary 18, 2002 at 7:02 am #571058Charlotte,
Thanks for this great tip.
Just confirming that this works fine in a VBA userform – Word 2000, Acrobat Reader 4.0.
I didn’t put the .LoadFile code into the Form_Initialize event procedure but instead put it in a cmd_Click procedure behind a button.Works great. It’s a little limited in that it doesn’t respond to keystrokes while it’s displaying in the form (mouse clicks only) but otherwise it’s the full Acrobat Reader app inside the userform. There’s got to be some good use this can be put to.
Gary
-
WSMike Shea
AskWoody LoungerFebruary 18, 2002 at 4:15 pm #571084I’m tried to add the PDF.OCX reference and it told me that the name conflicts with an existing module, project, or object library. I’ve checked every single reference and insertable object’s source file name and NONE are derived from PDF.OCX. I fixed this by renaming the ocx itself to xPDF.ocx and its supporting files. This thing is great, thank you everyone for your help.
-
WScharlotte
AskWoody Lounger -
WSMike Shea
AskWoody LoungerFebruary 19, 2002 at 4:05 pm #571315To add the control to the toolbox I need to go into Components, select browse, then select PDF.OCX. This added the control to the toolbox. I think I incorrectly referred to this as a reference.
Actually, in my last message I indicated I resolved that problem of the “Name conflicts with existing module, project, or object library” error when clicking Apply after selecting PDF.OCX by renaming it to xPDF.OCX. Well, that worked at the time, I built the entire thing, tested it, worked…etc.. Now today I come in and fire up my app and the Acrobat control now thinks it is a PictureBox control. When I try to add the pdx.ocx, or any variation of it, it gives me the same error. Is there a way to unistall that thing and reinstall it? Or am I barking up the wrong stack.
Also, I just tried deleting all references to the PDF.OCX and the name I renamed one of them to from the registery. When I tried adding it again as a component it gave me the same error as above.
-
WScharlotte
AskWoody LoungerFebruary 20, 2002 at 2:53 am #571449Yes, it was unclear that you were talking about the toolbox rather than references. I’m not sure what you did, but it sounds like it’s completely snarled up. Have you checked your references to see if there’s anything there that might be biting you?
You renamed the ocx itself? Have you tried renaming the ocx to its original name and creating a new project with nothing but a form in it? Drop the PDF.OCX on that form along with the necessary code to LoadFile and run the project. If that works, you should be able to untangle things without having to uninstall and reinstall the Reader. If it doesn’t, uninstall the reader and reboot before you reinstall it. I don’t know what else to suggest, but maybe someone else will come up with some ideas. It’s a very simple control to work with and shouldn’t take all this fiddling to use.
-
WSMike Shea
AskWoody LoungerFebruary 20, 2002 at 3:51 pm #571540This is a tough one, I know. I’ve never had so much trouble getting a control to work. It’s as if God doesn’t want me to use this thing, or use it consistently.
Here’s what’s happened since: Yesterday I was here till late, using regsvr32.exe to unregister the pdf.ocx, deleting any reference of it out of the registery, and browsing to it from the component manager and selecting it. Somehow, in this frenzy, I got it to work. I laughed, I cheered, I got up on my desk and started gyrating. .(thank God that everyone else went home), then I finished the form. It looked and worked perfectly!
So I shut down for the night, got in this morning and fired up my computer, and again, I thought it was an image control.
I uninstalled and reinstalled Acrobat, which didn
-
WSMike Shea
AskWoody LoungerFebruary 20, 2002 at 7:53 pm #571583Okay, have an update. I took Charlotte’s suggestion a step further and created a new project, then added each and every form, module, and class module into it. I had to go through a assign the references again – but the point is, IT WORKS.
I don’t know what was up with my other project, but this is how it was resolved.
Thank you again, everyone, for your help and input.
-
WScharlotte
AskWoody LoungerFebruary 21, 2002 at 3:26 am #571668Mike,
I just went back and checked the VB6 project I created to house the PDF.ocx because your reference to a PDF.tlb threw me. The reference that gets added to my project when I drop the PDF.ocx on a form is an associated file to that Adobe SVB Viewer Type Library 2.0 (SVGControl.oca) that we wondered about.
Anyhow, I’m glad you got it working. Sometimes starting over is the only way.
-
WScharlotte
AskWoody LoungerFebruary 17, 2002 at 5:15 pm #570958I haven’t even figured out what the SVG Viewer control is for!
It’s the PDF.ocx, which *is* a viewer, that you want to drop on your form.
You don’t use a property to populate it, you use code to call the control’s LoadFile method and point that at the file you want to display. You’ll get a neat PDF file display, complete with navigation controls, and all the other options you normally see in a reader window. My version of Acrobat Reader 5.0 includes the additional search features, so I can even search in the pdf document.
I had to download Reader 5.0 at work and install it on this machine before I managed to get this sorted out.
Oh, if anyone’s interested, this works the same way in an Access form and, I assume, in userforms in other Office apps as well.
-
WSMike Shea
AskWoody Lounger -
WScharlotte
AskWoody LoungerFebruary 21, 2002 at 3:42 am #571671I doubt that it’s possible. I’m not familiar with Acrobat Writer, so I don’t know what it’s capabilities are. If it is capable of capture from a TWAIN compliant device, then you may be able to scan a document directly into a PDF file and use that with the PDF.OCX, but I wouldn’t guarantee it.
-
WSMike Shea
AskWoody LoungerFebruary 21, 2002 at 9:57 pm #571824I just did some further checking. I called Adobe pretending to want to purchase the product I already owned. They don’t appear to have that functionality exposed. Now that I think about it, they probably don’t want to expose that function since it would hurt their market for the writer product they sell.
Do you (or anyone on this thread) know of a product besides Acrobat that can create and display an image document?
-
WScharlotte
AskWoody Lounger -
WSMike Shea
AskWoody LoungerFebruary 22, 2002 at 3:25 pm #571923Ideally, the users want a form with controls that they can type into. Though Acrobat 5.0 now allows controls to be put on a form, I’ve yet to figure out how to capture that data within Visula Basic.
Currently, this application is just a document management system so being able to view the document is fine. There is really no navigating through it since they are all one page. I guess in the future it could potentially be two, but for right now it is real basic.
I just got back from the VBits conference in San Francisco and there was a vendor that I think had something comparable, but I have to go through a mountain of stuff to find it. Oh, on that subject Charlotte, I actually looked at the class schedule to see if you were teaching any. I don’t know if you ever do that, but I wouldn’t mind sitting in on one of your lectures.
-
WScharlotte
AskWoody LoungerFebruary 23, 2002 at 3:58 am #572051Hah! *Nobody* wants to sit through one of my lectures … just ask my son … or my grandson!
I do all my teaching here in the Lounge, thanks. I was invited to be an applications instructor at one of our local community colleges, but I would need at least an Associate degree, and I’ve never had time to get one!
Go and listen to the *real* experts, and then come back and share their input with the rest of us.
-
WSMike Shea
AskWoody Lounger -
WScharlotte
AskWoody Lounger
-
-
-
WSjscher2000
AskWoody LoungerFebruary 6, 2002 at 4:15 am #568487Just to clarify my story, it was the Acrobat 4 control, I placed it on a VBA UserForm in the VBE in a Word document (not a template). I pre-rigged it to a particular document on my PC, and the PDF appeared with miniscule text at design time. So far, so good. Then I ran the form with the F5 key (not with a procedure in a module) and it froze up. So, maybe it would be willing to play with it again, but not right away.
-
-
Viewing 1 reply thread -

Plus Membership
Donations from Plus members keep this site going. You can identify the people who support AskWoody by the Plus badge on their avatars.
AskWoody Plus members not only get access to all of the contents of this site -- including Susan Bradley's frequently updated Patch Watch listing -- they also receive weekly AskWoody Plus Newsletters (formerly Windows Secrets Newsletter) and AskWoody Plus Alerts, emails when there are important breaking developments.
Get Plus!
Welcome to our unique respite from the madness.
It's easy to post questions about Windows 11, Windows 10, Win8.1, Win7, Surface, Office, or browse through our Forums. Post anonymously or register for greater privileges. Keep it civil, please: Decorous Lounge rules strictly enforced. Questions? Contact Customer Support.
Search Newsletters
Search Forums
View the Forum
Search for Topics
Recent Topics
-
Excessive security alerts
by
WSSebastian42
3 hours, 8 minutes ago -
* CrystalDiskMark may shorten SSD/USB Memory life
by
Alex5723
3 hours, 56 minutes ago -
Ben’s excellent adventure with Linux
by
Ben Myers
29 seconds ago -
Seconds are back in Windows 10!
by
Susan Bradley
5 hours, 8 minutes ago -
WebBrowserPassView — Take inventory of your stored passwords
by
Deanna McElveen
59 minutes ago -
OS news from WWDC 2025
by
Will Fastie
5 hours, 10 minutes ago -
Need help with graphics…
by
WSBatBytes
3 hours, 51 minutes ago -
AMD : Out of Bounds (OOB) read vulnerability in TPM 2.0 CVE-2025-2884
by
Alex5723
19 hours, 24 minutes ago -
Totally remove or disable BitLocker
by
CWBillow
18 hours, 17 minutes ago -
Windows 10 gets 6 years of ESU?
by
n0ads
6 hours, 13 minutes ago -
Apple, Google stores still offer China-based VPNs, report says
by
Nibbled To Death By Ducks
1 day, 6 hours ago -
Search Forums only bring up my posts?
by
Deo
1 day, 6 hours ago -
Windows Spotlight broken on Enterprise and Pro for Workstations?
by
steeviebops
1 day, 17 hours ago -
Denmark wants to dump Microsoft for Linux + LibreOffice
by
Alex5723
1 day, 10 hours ago -
How to get Microsoft Defender to honor Group Policy Setting
by
Ralph
1 day, 18 hours ago -
Apple : Paragon’s iOS Mercenary Spyware Finds Journalists Target
by
Alex5723
2 days, 4 hours ago -
Music : The Rose Room – It’s Been A Long, Long Time album
by
Alex5723
2 days, 5 hours ago -
Disengage Bitlocker
by
CWBillow
1 day, 19 hours ago -
Mac Mini M2 Service Program for No Power Issue
by
Alex5723
2 days, 7 hours ago -
New Win 11 Pro Geekom Setup questions
by
Deo
1 day, 6 hours ago -
Windows 11 Insider Preview build 26200.5651 released to DEV
by
joep517
2 days, 14 hours ago -
Windows 11 Insider Preview build 26120.4441 (24H2) released to BETA
by
joep517
2 days, 15 hours ago -
iOS 26,, MacOS 26 : Create your own AI chatbot
by
Alex5723
2 days, 18 hours ago -
New PC transfer program recommendations?
by
DaveBoston
23 hours, 50 minutes ago -
Windows 11 Insider Preview Build 22631.5545 (23H2) released to Release Preview
by
joep517
2 days, 22 hours ago -
Windows 10 Build 19045.6029 (22H2) to Release Preview Channel
by
joep517
2 days, 23 hours ago -
Best tools for upgrading a Windows 10 to an 11
by
Susan Bradley
2 days, 11 hours ago -
The end of Windows 10 is approaching, consider Linux and LibreOffice
by
Alex5723
1 day, 15 hours ago -
Extended Windows Built-in Disk Cleanup Utility
by
bbearren
2 days ago -
Win 11 24H2 June 2025 Update breaks WIFI
by
dportenlanger
3 days, 18 hours ago
Recent blog posts
- Ben’s excellent adventure with Linux
- Seconds are back in Windows 10!
- WebBrowserPassView — Take inventory of your stored passwords
- OS news from WWDC 2025
- Best tools for upgrading a Windows 10 to an 11
- Master patch listing for June 10, 2025
- 24H2 may not be offered June updates
- June 2025 updates are out
Key Links
Want to Advertise in the free newsletter? How about a gift subscription in honor of a birthday? Send an email to sb@askwoody.com to ask how.
Mastodon profile for DefConPatch
Mastodon profile for AskWoody
Home • About • FAQ • Posts & Privacy • Forums • My Account
Register • Free Newsletter • Plus Membership • Gift Certificates • MS-DEFCON Alerts
Copyright ©2004-2025 by AskWoody Tech LLC. All Rights Reserved.