Open External Files Using UNC Path via a Button

I need to use buttons to open up an Access 2003 Dbase and an Excel 2003 workbook both residing on a shared network folder.  Now I know I can open both of these using hyperlinks but this opens them up within a browser and that results in other issues hence my need to use UNC path, thanks.
ShadowITAsked:
Who is Participating?
 
ShadowITAuthor Commented:
Yeah, I thought so too but it doesn't...I added this to the button but keep receiving an error:

 Expected ';'
File:script.js
Line:29
      Dim wshShell
0
 
DhopeCommented:
Can use this C# code instead

Put in a button, edit code for the button (make sure it's C# code)

You need to add in
using System.Diagnostics;

then within the button code
Process.Start("C:\\blah.txt");

replacing blah.txt with the UNC of course

http://dotnetperls.com/Content/Process-Start-NET.aspx
0
Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 
DhopeCommented:
Also, the form needs to be fully trusted
0
 
ShadowITAuthor Commented:
Can't change form to C# because I'm using JScript elsewhere...
0
 
ShadowITAuthor Commented:
I just switched the form to vbs and was able to use this..
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.