Open PDF File from a Textbox value

Asked

Viewed 24 times

-1

Good night,

I am a bit stuck trying to optimize my form, the goal is to show the PDF file of equal name corresponding to the value in the Text Box. PDF files are all stored in the same folder directory, I am currently using Webbroswer because Acropdf is not working.

Currently I have this code that opens me a specific file, but I wanted to optimize as mentioned above.

Me.WebBrowser1.Navigate "about:blank"
Me.WebBrowser1.Document.write "<HTML><Body><embed src=""C:\Users\adhil\OneDrive\Ambiente de Trabalho\Marinha_Carreira\EH\1. Projetos\3. Pessoal\Excels\DMAT.pdf.pdf"" width=""100%"" height=""100%"" /></Body></HTML>"

Thank you.inserir a descrição da imagem aqui

1 answer

0

I just did the following line.

WebBrowser1.Navigate ("C:\filepath" & "\" & TextBox1.Value & ".pdf")

Browser other questions tagged

You are not signed in. Login or sign up in order to post.