Re: please help to view pdf files in Access forms
- From: riyaz <riyaz@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Thu, 31 Aug 2006 18:43:01 -0700
hi sreedhar
thanks for ur suggestions,
whether the PDF files will open in the same access window or as a separete
window,
i have run ur code , its opening in a separete window is it correct
cheers
riyaz
"Sreedhar" wrote:
Oooooooops !!!.
This code is part created by the command button wizard and the file dialog
part is copied from Northwind file. Hence, that Title "Select Employee
Picture". Change that to whatever you feel appropriate, like "Select PDF
File".
--
Sreedhar
"Sreedhar" wrote:
Hi Riyaz,
While you experiment with the ActiveX stuff, for the time being, I think you
can just use the Shell command to launch the AcrobatReader itself to view the
pdf file you want to view. The following code, triggered by the "On Click"
event of a Command Button on a form, attempts to do that :
Private Sub cmdViewPDF_Click()
On Error GoTo Err_cmdViewPDF_Click
Dim stAppName As String
Dim strPathToAdobe As String
Dim strFileToView As String
Dim Result As Integer
strPathToAdobe = "C:\Program Files\Adobe\Acrobat 7.0\Reader\AcroRd32 "
'Note the Space at the end of the above string expression.
With Application.FileDialog(msoFileDialogFilePicker)
.Title = "Select Employee Picture"
.Filters.Add "All Files", "*.*"
.Filters.Add "PDFs", "*.pdf"
.FilterIndex = 2
.AllowMultiSelect = False
.InitialFileName = CurrentProject.Path
Result = .Show
If (Result <> 0) Then
strFileToView = Trim(.SelectedItems.Item(1))
End If
End With
stAppName = strPathToAdobe & strFileToView
Call Shell(stAppName, 1)
Exit_cmdViewPDF_Click:
Exit Sub
Err_cmdViewPDF_Click:
MsgBox Err.Description
Resume Exit_cmdViewPDF_Click
End Sub
--
Sreedhar
"riyaz" wrote:
Hi
i m new to this activex linking in access, help me how to implement the pdf
activex n the forms & any coding needed for this,
thanks!
riyaz
"Alex Dybenko" wrote:
hi,
have a look at adobe site, I think some activex control is installed
together with acrobat
--
Best regards,
___________
Alex Dybenko (MVP)
http://alexdyb.blogspot.com
http://www.PointLtd.com
"riyaz" <riyaz@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:009B94AB-4BBC-4832-AF9A-A6FB7DD6E57E@xxxxxxxxxxxxxxxx
i am developing a access database which can able to view the pdf files in
the
forms.
please suggest how to to this.is there a need to add activeX control?
- Prev by Date: Re: please help to view pdf files in Access forms
- Next by Date: Re: Attaching files to a specific record
- Previous by thread: Re: please help to view pdf files in Access forms
- Next by thread: Re: Attaching files to a specific record
- Index(es):