So I have this Word doc with a bunch of ActiveX buttons, and whenever one of the buttons is pressed, a corresponding image pops up in a userform. It looks like this:
My problem is that each of the images that pops up is a screenshot of a portion of a PDF, but my users actually need to be able to select/copy the text presented.
Is there any good way to embed portions of a PDF file in a userform so that the text is select-able? It shouldn’t be edit-able, just select-able.
Or, worst case scenario, what might be the easiest way to copy text from the PDF myself and format it onto a userform?
I wouldn’t recommend using the image control for this if you want user to select the text from pdf.
- Install Adobe Pdf Reader on your pc.
- Create a New Userform and place the
CommandButtoncontrol and you are done.
To Add the
AcroPDF1 control see the screenshot
Next, draw the control on the Userform and place a CommandButton on the form
This is how your userform might look.
Put this code in the click event of the CommandButton1.
Option Explicit Private Sub CommandButton1_Click() '~~> Change filename as applicable AcroPDF1.LoadFile "C:\Sample.Pdf" End Sub
Now when you run it, the pdf will be displayed and you can select text. See screenshot below.