PDA

View Full Version : Powerpoint and VBA



giuweb
01-26-2012, 03:02 AM
Hi, I have a problem and I do not know how to finish a project.
Then, in a powerpoint slide I have two buttons and everyone has to open a pdf file in an add-on attached form. If the pdf was only one there would be no problems, but two or more than two as I open them. You place the code I use:

Button on the slide:
Private Sub BtnPA1_A_Click()
Load doPDF
doPDF.Show
end sub

On the form:
Private dopdf_load()
Dim filepdf As String

filepdf = App.Path & "\test.pdf"
With AcroPDF1
.LoadFile (filepdf)
.setShowToolbar True
.setShowScrollbars True
.setLayoutMode "SinglePage"
.SetPageMode "none"
.setView "full"
.gotoFirstPage
End With
End Sub

I do not understand why

dopdf.acropdf1.loadfile "C:\test.pdf"

if I put in the event of the button, the component on the form stays white and does not open the file.
Thanks in advance for the help
giuweb

raji2678
02-22-2012, 11:29 PM
Can you try putting the PDFs as an object link.?