Link to home
Start Free TrialLog in
Avatar of gideonn
gideonn

asked on

Open File from UNC Path within an InfoPath Page.

I am creating a form in InfoPath, I have a table which houses UNC file directories and file names for files that are part of a task request submission from users of the application who want to have documents reviewed by other users.  So I need to know is there any way that you can have InfoPath open a file from a user action?  Thanks!
ASKER CERTIFIED SOLUTION
Avatar of Brian Mulder
Brian Mulder
Flag of Netherlands 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 gideonn
gideonn

ASKER

One qucik question, how do I attach the DLL for use in InfoPath...
i assume you mean the activex dll ?

it is here in pictures starting with excersize 3 (in the lower third of the page)
http://blogs.msdn.com/ajma/articles/213868.aspx

just comment if you have more questions on this
Avatar of gideonn

ASKER

Ops, thanks!
Sorry, that was a stupid remark of me (haste makes waste)

i tried to reproduce your question

- i opened up Infopath
- used vb script as the programming language (i use infopath 2007 so need to enable it)
- then added this little script to the button event handler

'=======
' The following function handler is created by Microsoft Office InfoPath.
' Do not modify the name of the function, or the name and number of arguments.
'=======
Sub CTRL50_5_OnClick(eventObj)
' Write your code here
    Dim wshShell
    Set wshShell = CreateObject("Wscript.Shell")
    wshShell.Run ("c:\AEXO20070522.txt")
End Sub

- and this opened my file, no UNC path to test here

but just comment if it is not clear yet

Regards
Brian
I tried to replicate this but I keep receiving an error when I the code below.  The error is below, any idea what I am doing wrong?:

Form template: file:///\\tx57ntfs1\data\Purchasing\IAC-TX40\Databases\Frontlog\Development\Frontlog%20Dev.xsn
InfoPath cannot open the selected form because of an error in the form's code.
The following error occurred:

Expected ';'
File:script.js
Line:29
      Dim wshShell