Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / General MS InfoPath Questions / July 2004

Tip: Looking for answers? Try searching our database.

Deleting forms from a Sharepoint Library Site

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Tomma - 30 Jun 2004 00:18 GMT
How do you delete a form programmatically from a
sharepoint form library site??
Tomma - 30 Jun 2004 06:09 GMT
fixed.

>-----Original Message-----
>How do you delete a form programmatically from a
>sharepoint form library site??
>
>.
Chris - 01 Jul 2004 03:32 GMT
Can you please tell me how you did this??

> fixed.
>
[quoted text clipped - 3 lines]
> >
> >.
Tomma - 06 Jul 2004 00:47 GMT
Sure thing,

This is .net code....

Use this function to get the forms published url

Private Function SubmitURL() As String
           Dim URL, strFID As String
           URL = thisXDocument.Solution.URI

           If URL.Substring(0, 4) = "http" Then
               URL = URL.Substring(0, URL.LastIndexOf
("/"))
               URL = URL.Substring(0, URL.LastIndexOf
("/") + 1)

               'absolute path of node FID
               nodeFID = getNode("//my:FID")
               strFID = nodeFID.text

               SubmitURL = URL & strFID & ".xml"
               SubmitURL = Trim(SubmitURL)

           End If

       End Function

Then call this sub to delete the file
Private Sub DeleteFile()
       
           Dim oXmlHttp As New MSXML2.XMLHTTP26Class

           Dim strURL As String = SubmitURL()

           oXmlHttp.open("DELETE", strURL, False)
           oXmlHttp.send()

'here is the status numbers of the oXmlhttp object if you
run into trouble
           '404 is not found
           '204 is no content
           '201 created
           thisApplication.Quit(True)
       End Sub
>-----Original Message-----
>Can you please tell me how you did this??
[quoted text clipped - 8 lines]
>> >
>.
Tomma - 06 Jul 2004 00:48 GMT
Sure thing,

This is .net code....

Use this function to get the forms published url

Private Function SubmitURL() As String
           Dim URL, strFID As String
           URL = thisXDocument.Solution.URI

           If URL.Substring(0, 4) = "http" Then
               URL = URL.Substring(0, URL.LastIndexOf
("/"))
               URL = URL.Substring(0, URL.LastIndexOf
("/") + 1)

               'absolute path of node FID
               nodeFID = getNode("//my:FID")
               strFID = nodeFID.text

               SubmitURL = URL & strFID & ".xml"
               SubmitURL = Trim(SubmitURL)

           End If

       End Function

Then call this sub to delete the file
Private Sub DeleteFile()
       
           Dim oXmlHttp As New MSXML2.XMLHTTP26Class

           Dim strURL As String = SubmitURL()

           oXmlHttp.open("DELETE", strURL, False)
           oXmlHttp.send()

'here is the status numbers of the oXmlhttp object if you
run into trouble
           '404 is not found
           '204 is no content
           '201 created
           thisApplication.Quit(True)
       End Sub
>-----Original Message-----
>Can you please tell me how you did this??
[quoted text clipped - 8 lines]
>> >
>.
Tomma - 06 Jul 2004 00:48 GMT
Sure thing,

This is .net code....

Use this function to get the forms published url

Private Function SubmitURL() As String
           Dim URL, strFID As String
           URL = thisXDocument.Solution.URI

           If URL.Substring(0, 4) = "http" Then
               URL = URL.Substring(0, URL.LastIndexOf
("/"))
               URL = URL.Substring(0, URL.LastIndexOf
("/") + 1)

               'absolute path of node FID
               nodeFID = getNode("//my:FID")
               strFID = nodeFID.text

               SubmitURL = URL & strFID & ".xml"
               SubmitURL = Trim(SubmitURL)

           End If

       End Function

Then call this sub to delete the file
Private Sub DeleteFile()
       
           Dim oXmlHttp As New MSXML2.XMLHTTP26Class

           Dim strURL As String = SubmitURL()

           oXmlHttp.open("DELETE", strURL, False)
           oXmlHttp.send()

'here is the status numbers of the oXmlhttp object if you
run into trouble
           '404 is not found
           '204 is no content
           '201 created
           thisApplication.Quit(True)
       End Sub
>-----Original Message-----
>Can you please tell me how you did this??
[quoted text clipped - 8 lines]
>> >
>.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.