Solved

Open External Files Using UNC Path via a Button Using JScript

Posted on 2011-09-21
2
339 Views
Last Modified: 2012-08-13
Hello Experts,

Without getting into too much detail I need to use JScript to open some .xls & .mdb files via buttons within an InfoPath 2003 form.  I know how to accomplish this using vbs but obviously I can't do that now.  Aside from suggesting using a link; does anyone know how to accomplish this with js?

Thanks
0
Comment
Question by:ShadowIT
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
2 Comments
 

Accepted Solution

by:
ShadowIT earned 0 total points
ID: 36587281
I figured this out myself, here's the code in case anyone else needs it.  It works for both UNC paths and URLs (be sure to add extra "\'):

}

p.s. for UNC path {
var Act = new ActiveXObject("Wscript.Shell");
 var File = ("\\\\Your\\file\\here");  
  try {Act.Run("\""+File+"\"",1,false);}
  catch(e){ Act.Popup("" +'\n'+ File, 0,"", 0 + 0 + 0);}
}
0
 

Author Closing Comment

by:ShadowIT
ID: 36587284
I answered the quesiton myself, please refund my points.
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Ready to improve network connectivity? Watch this webinar to learn how SD-WANs and a one-click instant connect tool can boost provisions, deployment, and management of your cloud connection.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Before you can digitally sign infopath forms, you must have a digital certificate. Microsoft Certificate Services will need to be enabled on a Windows Server 2008 to facilitate the creation and verification of the digital certifciates on the web ser…
First of all let me say that the only language that I speak is English, but in answering questions here I often come across people whose English skills are not the best and I’d like to be able to communicate better with them, and the following descr…
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…

615 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question