Link to home
Start Free TrialLog in
Avatar of ShadowIT
ShadowITFlag for United States of America

asked on

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.
ASKER CERTIFIED SOLUTION
Avatar of Dhope
Dhope
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of ShadowIT

ASKER

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
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
Also, the form needs to be fully trusted
Can't change form to C# because I'm using JScript elsewhere...
I just switched the form to vbs and was able to use this..