I looked through Almeida's post about using a button to open a web page however that solution is not working for me. My IP form is being hosted on a SharePoint 2007 Forms Server.
I have a button on my IP form that uses rules and custom code. When the button is pressed the form should: 1) update a field in the XML and 2) open a PDF file hosted on my SharePoint site. I have the following code for my button:
Public Sub btn_CodeofEthics_Clicked(ByVal sender As Object, ByVal e As ClickedEventArgs)
' Opens the PDF fileDim proc As New System.Diagnostics.Process()
proc.StartInfo.FileName =
"iexplore"
proc.StartInfo.Arguments =
"http://intranet/Documents/COEcurrent.pdf"
proc.Start()
End Sub
The code runs fine when I'm debugging it from my workstation, but when I publish the form to SharePoint and press the button, I get the following error:
Event Type: Warning
Event Source: Office SharePoint Server
Event Category: Forms Services Runtime - Business Logic
Event ID: 5337
Date: 3/5/2009
Time: 3:20:52 PM
User: N/A
Description:
Business logic failed due to an exception. (User: NETWORK\User_A, Form Name: PolicyCertification, IP: , Request: http://intranet/_layouts/Postback.FormServer.aspx, Form ID: urn:schemas-microsoft-com:office:infopath:PolicyCertification:-myXSD-2008-02-29T16-34-05, Type: Win32Exception, Exception Message: Access is denied)
Can anyone help with this issue please?
Thank you in advance,
Chris