Re: please help to view pdf files in Access forms

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



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?




.



Relevant Pages

  • Re: Cant browse PDF files
    ... IE browser software defaults Acrobat Reader to "OFF" to display PDF files. ... Adobe Acrobat .pdf Files Appear as a Blank Window or Frame ... Explorer-View-Folder Options-File Types ...
    (microsoft.public.windows.inetexplorer.ie6.browser)
  • Re: Acrobat Pro Plug-In Crashes IE
    ... Problems Opening PDF Files in Internet Explorer ... Now, it launches a separate browser window, but when I close the new window, I receive an error message that says, "Internet Explorer has encountered a problem with an add-on and needs to close. ...
    (microsoft.public.windows.inetexplorer.ie6.browser)
  • Re: Opening PDF with zoom
    ... I just copied a sub to open PDF files with Adobe Reader in another message, but if the Adobe Reader is not installed it's an issue, so I changed it to be a function that returns true if it could open the file. ... Private Type SHELLEXECUTEINFO ... lpVerb As String ...
    (microsoft.public.vb.general.discussion)
  • RE: Help with merging PDF Files
    ... Private Declare Function MergePDFDocuments _ ... ByVal PDFChild As String _ ... catalog and outputs them to pdf files numerically/sequentially named 1.pdf, ... pdoSortByName, pdoSortOrderAscending ...
    (microsoft.public.access.modulesdaovba)
  • Re: Printing Saved Files
    ... I have it creating the PDF files now and when I'm ready to ... > Here is some code to create a PDF file using Visual FoxPro: ... Demo showing how to print a Fox report to a PDF ... > DECLARE INTEGER FindWindow IN WIN32API STRING, ...
    (microsoft.public.fox.vfp.reports.printing)