Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Macros / August 2004

Tip: Looking for answers? Try searching our database.

How can I write a VB code to open a file say pdf document

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
new.microsoft.com - 11 Aug 2004 10:38 GMT
How can I write a VB code to open a file say pdf document

Thanks
Jim/Chris - 11 Aug 2004 13:01 GMT
Her is a function

Function runapp()
On Error GoTo runapp_Err

   Call Shell("Path to PDF App" "Path to document""", 1)

runapp_Exit:
   Exit Function

runapp_Err:
   MsgBox Error$
   Resume runapp_Exit

End Function

Jim

>-----Original Message-----
>How can I write a VB code to open a file say pdf document
>
>Thanks
>
>.
new.microsoft.com - 12 Aug 2004 03:39 GMT
Hi Jim,

I have keyed in this statement, it has "Run time error 53" which states
"File not Found"

Call Shell("C:\Program Files\Adobe\Acrobat
5.0\Acrobat\acrobat.exe""C:\grade.pdf""", 1)

can you help?
Thanks again

> Her is a function
>
[quoted text clipped - 20 lines]
> >
> >.
"Mingqing Cheng [MSFT]" - 12 Aug 2004 07:20 GMT
Hi,

Thanks Jim for his great answer!

From Jim's suggestions, the following codes runs well on my machine.

Private Sub Command0_Click()
Call Shell("c:\Program Files\Adobe\Acrobat 6.0\Acrobat\Acrobat.exe
c:\a.pdf", 1)
End Sub

Thank you for your patience and cooperation. If you have any questions or
concerns, don't hesitate to let me know. We are here to be of assistance!


Sincerely yours,

Mingqing Cheng
Microsoft Developer Community Support
---------------------------------------------------------------
Introduction to Yukon! - http://www.microsoft.com/sql/yukon
This posting is provided "as is" with no warranties and confers no rights.
Please reply to newsgroups only, many thanks!
new.microsoft.com - 13 Aug 2004 09:15 GMT
Thank you Jim and  Mingqing Cheng, it is ok now.

> Hi,
>
[quoted text clipped - 18 lines]
> This posting is provided "as is" with no warranties and confers no rights.
> Please reply to newsgroups only, many thanks!
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.