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?
Thanks!
I wouldn't recommend using the image control for this if you want user to select the text from pdf.
Do this.
AcroPDF1
and CommandButton
control 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.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.