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
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
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
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
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.Shel l")
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 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.Shel
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\P urchasing\ IAC-TX40\D atabases\F rontlog\De velopment\ Frontlog%2 0Dev.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
Form template: file:///\\tx57ntfs1\data\P
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
ASKER