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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ActiveX acrobat, I can't change src of pdf 1

Status
Not open for further replies.

stefnany

Programmer
Mar 1, 2004
20
CA
i want to use pdf.ocx in visual basic 6.0.
when i call the pdf1.src= file name
for the first time it works but when i call it second time it give me
RUN TIME ERROR on method src
plz anyone advice me on how to solve this problems
thank you
 

Welcome to TT stefnany. To get the most from these fora please read FAQ222-2244.

I belive you need to close the current open file prior to attempting this method again.

Good Luck

 

Try something like...
[tt]
PDF1.src = ""
DoEvents
PDF1.src = newfilename
[/tt]

Good Luck


 
I don't have any more error, but the new file don't open.
 
You can try this, it works for me

>>to unload the file
ocxDocumentPDF.LoadFile ""

>>to load the new file
ocxDocPDF.LoadFile strFileName
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top